Get the range of lines affected in the old sequence.
(&self)
| 174 | |
| 175 | /// Get the range of lines affected in the old sequence. |
| 176 | pub fn old_range(&self) -> Range<usize> { |
| 177 | match *self { |
| 178 | DiffOp::Equal { old_pos, len, .. } => old_pos..old_pos + len, |
| 179 | DiffOp::Insert { old_pos, .. } => old_pos..old_pos, |
| 180 | DiffOp::Delete { old_pos, len, .. } => old_pos..old_pos + len, |
| 181 | DiffOp::Replace { |
| 182 | old_pos, old_len, .. |
| 183 | } => old_pos..old_pos + old_len, |
| 184 | } |
| 185 | } |
| 186 | |
| 187 | /// Get the range of lines affected in the new sequence. |
| 188 | pub fn new_range(&self) -> Range<usize> { |
nothing calls this directly
no outgoing calls
no test coverage detected