Skip to content

Commit

Permalink
Merge pull request #15 from ugur-a/patch-1
Browse files Browse the repository at this point in the history
typos
  • Loading branch information
Byron authored Dec 9, 2024
2 parents 6fc0dc1 + 5bc849c commit 77e79cc
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/sink.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,27 @@ pub trait Sink: Sized {
type Out;

/// This method is called whenever a diff [`algorithm`](crate::Algorithm)
/// finds a change between the two processed input file.
/// A change is a continous subsequence of [tokens](crate::intern::Token) `before` that needs
/// to be replaced by a different contious subsequence of tokens `after` to construct the seconds file from the first.
/// finds a change between the two processed input files.
/// A change is a continuous subsequence of [tokens](crate::intern::Token) `before` that needs
/// to be replaced by a different continuous subsequence of tokens `after` to construct the second file from the first.
///
/// These token subsequences are passed to this function in in ** strictly montonically increasing order**.
/// That means that for two subsequenct calls `process_change(before1, after1)` and `process_change(before2, after2)`
/// These token subsequences are passed to this function in in ** strictly monotonically increasing order**.
/// That means that for two subsequent calls `process_change(before1, after1)` and `process_change(before2, after2)`
/// the following always holds:
///
/// ``` no_compile
/// assert!(before1.end < before2.start);
/// assert!(after1.end < after2.start);
/// ```
///
/// # Paramters
/// # Parameters
/// - **`before`** - the **position** of the removed token subsequence in the orignal file.
/// - **`after`** - the **position** of the inserted token subsequence in the destination file.
///
/// # Notes
////
/// A `Sink` has no function to indicate that a section of a file remains unchanged.
/// However due to the montonically increasing calls, implementations can easily determine
/// A `Sink` has no function to indicate that a section of a file remains unchanged.
/// However due to the monotonically increasing calls, implementations can easily determine
/// which subsequences remain unchanged by saving `before.end`/`after.end`.
/// The range between `before.start`/`after.end` and the previous `before.end`/`after.end`
/// is always unchanged.
Expand Down

0 comments on commit 77e79cc

Please sign in to comment.