Improve docs
This commit is contained in:
parent
78fe3fd6fd
commit
a2119b0f32
2 changed files with 4 additions and 5 deletions
|
|
@ -20,9 +20,10 @@ use crate::{
|
||||||
/// insert the same span with a common prefix, that prefix will only
|
/// insert the same span with a common prefix, that prefix will only
|
||||||
/// be present once in the output.
|
/// be present once in the output.
|
||||||
///
|
///
|
||||||
/// Deletes are preserved from both sides. This means that an insert
|
/// When both sides delete the same span, it will be deleted in the
|
||||||
/// from one side into a deleted span from the other side will result
|
/// return value. If one side deletes a span and the other side inserts
|
||||||
/// in the removal of the original span but keeping the inserted text.
|
/// into that span, the inserted text will be present in the return
|
||||||
|
/// value.
|
||||||
///
|
///
|
||||||
/// The function supports UTF-8. The arguments are tokenized at the
|
/// The function supports UTF-8. The arguments are tokenized at the
|
||||||
/// granularity of words.
|
/// granularity of words.
|
||||||
|
|
|
||||||
|
|
@ -150,7 +150,6 @@ where
|
||||||
let result = operation.merge_operations(&mut last_other_op);
|
let result = operation.merge_operations(&mut last_other_op);
|
||||||
|
|
||||||
if let ref op @ (Operation::Insert { .. } | Operation::Equal { .. }) = result {
|
if let ref op @ (Operation::Insert { .. } | Operation::Equal { .. }) = result {
|
||||||
// Calculate shift using safe casts - preserving original logic
|
|
||||||
let merged_length_signed =
|
let merged_length_signed =
|
||||||
isize::try_from(merged_length).unwrap_or(isize::MAX);
|
isize::try_from(merged_length).unwrap_or(isize::MAX);
|
||||||
let seen_left_length_signed =
|
let seen_left_length_signed =
|
||||||
|
|
@ -184,7 +183,6 @@ where
|
||||||
let result = operation.merge_operations(&mut last_other_op);
|
let result = operation.merge_operations(&mut last_other_op);
|
||||||
|
|
||||||
if let ref op @ (Operation::Insert { .. } | Operation::Equal { .. }) = result {
|
if let ref op @ (Operation::Insert { .. } | Operation::Equal { .. }) = result {
|
||||||
// Calculate shift using safe casts - preserving original logic
|
|
||||||
let merged_length_signed =
|
let merged_length_signed =
|
||||||
isize::try_from(merged_length).unwrap_or(isize::MAX);
|
isize::try_from(merged_length).unwrap_or(isize::MAX);
|
||||||
let seen_right_length_signed =
|
let seen_right_length_signed =
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue