diff options
Diffstat (limited to 'src/edits.rs')
-rw-r--r-- | src/edits.rs | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/edits.rs b/src/edits.rs index 11979aa8..bd90787d 100644 --- a/src/edits.rs +++ b/src/edits.rs @@ -8,10 +8,16 @@ use crate::align; /// Infer the edit operations responsible for the differences between a collection of old and new /// lines. A "line" is a string. An annotated line is a Vec of (op, &str) pairs, where the &str /// slices are slices of the line, and their concatenation equals the line. Return the input minus -/// and plus lines, in annotated form. Also return a specification of the inferred alignment of -/// minus and plus lines. `noop_deletions[i]` is the appropriate deletion operation tag to be used -/// for `minus_lines[i]`; `noop_deletions` is guaranteed to be the same length as `minus_lines`. -/// The equivalent statements hold for `plus_insertions` and `plus_lines`. +/// and plus lines, in annotated form. +/// +/// Also return a specification of the inferred alignment of minus and plus lines: a paired minus +/// and plus line is represented in this alignment specification as +/// (Some(minus_line_index),Some(plus_line_index)), whereas an unpaired minus line is +/// (Some(minus_line_index), None). +/// +/// `noop_deletions[i]` is the appropriate deletion operation tag to be used for `minus_lines[i]`; +/// `noop_deletions` is guaranteed to be the same length as `minus_lines`. The equivalent statements +/// hold for `plus_insertions` and `plus_lines`. #[allow(clippy::too_many_arguments)] #[allow(clippy::type_complexity)] pub fn infer_edits<'a, EditOperation>( |