Get the concatenated content of new tokens in a range.
(&self, range: &Range<usize>)
| 429 | |
| 430 | /// Get the concatenated content of new tokens in a range. |
| 431 | pub fn new_content_in_range(&self, range: &Range<usize>) -> String { |
| 432 | self.new_tokens[range.clone()] |
| 433 | .iter() |
| 434 | .map(|t| t.as_str()) |
| 435 | .collect::<Vec<_>>() |
| 436 | .concat() |
| 437 | } |
| 438 | |
| 439 | /// Add an operation to the result. |
| 440 | fn push(&mut self, op: WordDiffOp) { |