Get the number of lines inserted by this operation.
(&self)
| 208 | |
| 209 | /// Get the number of lines inserted by this operation. |
| 210 | pub fn insertions(&self) -> usize { |
| 211 | match *self { |
| 212 | DiffOp::Equal { .. } => 0, |
| 213 | DiffOp::Insert { len, .. } => len, |
| 214 | DiffOp::Delete { .. } => 0, |
| 215 | DiffOp::Replace { new_len, .. } => new_len, |
| 216 | } |
| 217 | } |
| 218 | } |
| 219 | |
| 220 | impl fmt::Display for DiffOp { |
no test coverage detected