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