From 182cb42953acbd61bd21d4f9733b5b0bfb27f5f7 Mon Sep 17 00:00:00 2001 From: redistay Date: Tue, 2 Apr 2024 19:37:55 +0800 Subject: [PATCH] chore: fix some typos in conments Signed-off-by: redistay --- dump/src/reader/v2/updates.rs | 2 +- dump/src/writer.rs | 2 +- filter-parser/src/value.rs | 2 +- index-scheduler/src/autobatcher.rs | 2 +- milli/src/index.rs | 4 ++-- milli/src/update/words_prefixes_fst.rs | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dump/src/reader/v2/updates.rs b/dump/src/reader/v2/updates.rs index bf1227c7a..82bde6bf1 100644 --- a/dump/src/reader/v2/updates.rs +++ b/dump/src/reader/v2/updates.rs @@ -61,7 +61,7 @@ pub enum IndexDocumentsMethod { #[cfg_attr(test, derive(serde::Serialize))] #[non_exhaustive] pub enum UpdateFormat { - /// The given update is a real **comma seperated** CSV with headers on the first line. + /// The given update is a real **comma separated** CSV with headers on the first line. Csv, /// The given update is a JSON array with documents inside. Json, diff --git a/dump/src/writer.rs b/dump/src/writer.rs index 3c8126876..ae89e7005 100644 --- a/dump/src/writer.rs +++ b/dump/src/writer.rs @@ -219,7 +219,7 @@ pub(crate) mod test { fn _create_directory_hierarchy(dir: &Path, depth: usize) -> String { let mut ret = String::new(); - // the entries are not guarenteed to be returned in the same order thus we need to sort them. + // the entries are not guaranteed to be returned in the same order thus we need to sort them. let mut entries = fs::read_dir(dir).unwrap().collect::, _>>().unwrap(); diff --git a/filter-parser/src/value.rs b/filter-parser/src/value.rs index 1d70cb025..b1ecac55b 100644 --- a/filter-parser/src/value.rs +++ b/filter-parser/src/value.rs @@ -42,7 +42,7 @@ fn quoted_by(quote: char, input: Span) -> IResult { ))); } } - // if it was preceeded by a `\` or if it was anything else we can continue to advance + // if it was preceded by a `\` or if it was anything else we can continue to advance } Ok(( diff --git a/index-scheduler/src/autobatcher.rs b/index-scheduler/src/autobatcher.rs index 8f3ffa146..dc184947c 100644 --- a/index-scheduler/src/autobatcher.rs +++ b/index-scheduler/src/autobatcher.rs @@ -870,7 +870,7 @@ mod tests { debug_snapshot!(autobatch_from(false,None, [doc_imp(UpdateDocuments, false, None), settings(false), idx_del()]), @"Some((IndexDeletion { ids: [0, 2, 1] }, false))"); debug_snapshot!(autobatch_from(false,None, [doc_imp(ReplaceDocuments,false, None), settings(false), doc_clr(), idx_del()]), @"Some((IndexDeletion { ids: [1, 3, 0, 2] }, false))"); debug_snapshot!(autobatch_from(false,None, [doc_imp(UpdateDocuments, false, None), settings(false), doc_clr(), idx_del()]), @"Some((IndexDeletion { ids: [1, 3, 0, 2] }, false))"); - // The third and final case is when the first task doesn't create an index but is directly followed by a task creating an index. In this case we can't batch whith what + // The third and final case is when the first task doesn't create an index but is directly followed by a task creating an index. In this case we can't batch whit what // follows because we first need to process the erronous batch. debug_snapshot!(autobatch_from(false,None, [doc_imp(ReplaceDocuments,false, None), settings(true), idx_del()]), @"Some((DocumentOperation { method: ReplaceDocuments, allow_index_creation: false, primary_key: None, operation_ids: [0] }, false))"); debug_snapshot!(autobatch_from(false,None, [doc_imp(UpdateDocuments, false, None), settings(true), idx_del()]), @"Some((DocumentOperation { method: UpdateDocuments, allow_index_creation: false, primary_key: None, operation_ids: [0] }, false))"); diff --git a/milli/src/index.rs b/milli/src/index.rs index d921de9e4..74f71ff29 100644 --- a/milli/src/index.rs +++ b/milli/src/index.rs @@ -1116,7 +1116,7 @@ impl Index { /* words prefixes fst */ - /// Writes the FST which is the words prefixes dictionnary of the engine. + /// Writes the FST which is the words prefixes dictionary of the engine. pub(crate) fn put_words_prefixes_fst>( &self, wtxn: &mut RwTxn, @@ -1129,7 +1129,7 @@ impl Index { ) } - /// Returns the FST which is the words prefixes dictionnary of the engine. + /// Returns the FST which is the words prefixes dictionary of the engine. pub fn words_prefixes_fst<'t>(&self, rtxn: &'t RoTxn) -> Result>> { match self.main.remap_types::().get(rtxn, main_key::WORDS_PREFIXES_FST_KEY)? { Some(bytes) => Ok(fst::Set::new(bytes)?.map_data(Cow::Borrowed)?), diff --git a/milli/src/update/words_prefixes_fst.rs b/milli/src/update/words_prefixes_fst.rs index bb1830727..8b438cef3 100644 --- a/milli/src/update/words_prefixes_fst.rs +++ b/milli/src/update/words_prefixes_fst.rs @@ -20,7 +20,7 @@ impl<'t, 'i> WordsPrefixesFst<'t, 'i> { /// Set the number of words required to make a prefix be part of the words prefixes /// database. If a word prefix is supposed to match more than this number of words in the - /// dictionnary, therefore this prefix is added to the words prefixes datastructures. + /// dictionary, therefore this prefix is added to the words prefixes datastructures. /// /// Default value is 100. This value must be higher than 50 and will be clamped /// to this bound otherwise.