Convert a single LineChange to LineOps.
(
&mut self,
change: &LineChange<'a>,
)
| 342 | |
| 343 | /// Convert a single LineChange to LineOps. |
| 344 | fn convert_line_change<'a>( |
| 345 | &mut self, |
| 346 | change: &LineChange<'a>, |
| 347 | ) -> ConversionResult<Vec<LineOps>> { |
| 348 | match change { |
| 349 | LineChange::Added { |
| 350 | line_num, |
| 351 | line, |
| 352 | tokens, |
| 353 | .. |
| 354 | } => self.convert_added_line(*line_num, line, tokens), |
| 355 | LineChange::Deleted { |
| 356 | line_num, |
| 357 | line, |
| 358 | tokens, |
| 359 | .. |
| 360 | } => self.convert_deleted_line(*line_num, line, tokens), |
| 361 | LineChange::Modified { |
| 362 | old_line_num, |
| 363 | new_line_num, |
| 364 | before, |
| 365 | after, |
| 366 | token_changes, |
| 367 | .. |
| 368 | } => self.convert_modified_line( |
| 369 | *old_line_num, |
| 370 | *new_line_num, |
| 371 | before, |
| 372 | after, |
| 373 | token_changes, |
| 374 | ), |
| 375 | } |
| 376 | } |
| 377 | |
| 378 | /// Convert an added line to LineOps. |
| 379 | fn convert_added_line<'a>( |
no test coverage detected