Old-file position: the line number for removals, or the insertion boundary (the number of the preceding old line) for additions.
(&self)
| 781 | /// Old-file position: the line number for removals, or the insertion |
| 782 | /// boundary (the number of the preceding old line) for additions. |
| 783 | fn old_pos(&self) -> usize { |
| 784 | match self.line.status { |
| 785 | LineStatus::Removed => self.line.old_line_num.unwrap_or(1), |
| 786 | _ => { |
| 787 | (self.line.new_line_num.unwrap_or(1) as isize - 1 - self.net_before).max(0) as usize |
| 788 | } |
| 789 | } |
| 790 | } |
| 791 | |
| 792 | /// New-file position: the line number for additions, or the deletion |
| 793 | /// boundary (the number of the preceding new line) for removals. |
no outgoing calls
no test coverage detected