New-file position: the line number for additions, or the deletion boundary (the number of the preceding new line) for removals.
(&self)
| 56 | /// New-file position: the line number for additions, or the deletion |
| 57 | /// boundary (the number of the preceding new line) for removals. |
| 58 | fn new_pos(&self) -> usize { |
| 59 | match self.line.status { |
| 60 | LineStatus::Added => self.line.new_line_num.unwrap_or(1), |
| 61 | _ => { |
| 62 | (self.line.old_line_num.unwrap_or(1) as isize - 1 + self.net_before).max(0) as usize |
| 63 | } |
| 64 | } |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | impl Diff { |
no outgoing calls
no test coverage detected