Fixed some spelling mistakes
This commit is contained in:
parent
81ba51fc3c
commit
452c79bac5
6 changed files with 11 additions and 11 deletions
|
|
@ -62,14 +62,14 @@ pub trait DiffableStr: Hash + PartialEq + PartialOrd + Ord + Eq + ToOwned {
|
|||
/// Tokenizes into words.
|
||||
fn tokenize_words(&self) -> Vec<&Self>;
|
||||
|
||||
/// Splits the input into characters.
|
||||
/// Tokenizes the input into characters.
|
||||
fn tokenize_chars(&self) -> Vec<&Self>;
|
||||
|
||||
/// Splits into unicode words.
|
||||
/// Tokenizes into unicode words.
|
||||
#[cfg(feature = "unicode")]
|
||||
fn tokenize_unicode_words(&self) -> Vec<&Self>;
|
||||
|
||||
/// Splits into unicode graphemes..
|
||||
/// Tokenizes into unicode graphemes.
|
||||
#[cfg(feature = "unicode")]
|
||||
fn tokenize_graphemes(&self) -> Vec<&Self>;
|
||||
|
||||
|
|
|
|||
|
|
@ -364,7 +364,7 @@ pub fn get_close_matches<'a, T: DiffableStr + ?Sized>(
|
|||
let diff = TextDiff::from_slices(&seq1, &seq2);
|
||||
let ratio = diff.ratio();
|
||||
if ratio >= cutoff {
|
||||
// we're putting the word iself in reverse in so that matches with
|
||||
// we're putting the word itself in reverse in so that matches with
|
||||
// the same ratio are ordered lexicographically.
|
||||
matches.push(((ratio * u32::MAX as f32) as u32, Reverse(possibility)));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue