mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-11 15:38:55 +01:00
fix clippy warnings
This commit is contained in:
parent
6eb7843858
commit
5fe0e06342
@ -146,8 +146,8 @@ where A: AsRef<[u8]>,
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn apply_addition<'a, 'b, 'c>(
|
pub fn apply_addition(
|
||||||
writer: &'a mut heed::RwTxn<'b, 'c, MainT>,
|
writer: &mut heed::RwTxn<MainT>,
|
||||||
index: &store::Index,
|
index: &store::Index,
|
||||||
new_documents: Vec<IndexMap<String, Value>>,
|
new_documents: Vec<IndexMap<String, Value>>,
|
||||||
partial: bool
|
partial: bool
|
||||||
@ -272,16 +272,16 @@ pub fn apply_addition<'a, 'b, 'c>(
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn apply_documents_partial_addition<'a, 'b, 'c>(
|
pub fn apply_documents_partial_addition(
|
||||||
writer: &'a mut heed::RwTxn<'b, 'c, MainT>,
|
writer: &mut heed::RwTxn<MainT>,
|
||||||
index: &store::Index,
|
index: &store::Index,
|
||||||
new_documents: Vec<IndexMap<String, Value>>,
|
new_documents: Vec<IndexMap<String, Value>>,
|
||||||
) -> MResult<()> {
|
) -> MResult<()> {
|
||||||
apply_addition(writer, index, new_documents, true)
|
apply_addition(writer, index, new_documents, true)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn apply_documents_addition<'a, 'b, 'c>(
|
pub fn apply_documents_addition(
|
||||||
writer: &'a mut heed::RwTxn<'b, 'c, MainT>,
|
writer: &mut heed::RwTxn<MainT>,
|
||||||
index: &store::Index,
|
index: &store::Index,
|
||||||
new_documents: Vec<IndexMap<String, Value>>,
|
new_documents: Vec<IndexMap<String, Value>>,
|
||||||
) -> MResult<()> {
|
) -> MResult<()> {
|
||||||
|
@ -212,8 +212,8 @@ pub fn next_update_id(
|
|||||||
Ok(new_update_id)
|
Ok(new_update_id)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn update_task<'a, 'b, 'c>(
|
pub fn update_task(
|
||||||
writer: &'a mut heed::RwTxn<'b, 'c, MainT>,
|
writer: &mut heed::RwTxn<MainT>,
|
||||||
index: &store::Index,
|
index: &store::Index,
|
||||||
update_id: u64,
|
update_id: u64,
|
||||||
update: Update,
|
update: Update,
|
||||||
|
@ -4,22 +4,22 @@ use slice_group_by::StrGroupBy;
|
|||||||
use std::iter::Peekable;
|
use std::iter::Peekable;
|
||||||
|
|
||||||
pub fn is_cjk(c: char) -> bool {
|
pub fn is_cjk(c: char) -> bool {
|
||||||
(c >= '\u{1100}' && c <= '\u{11ff}') // Hangul Jamo
|
('\u{1100}'..='\u{11ff}').contains(&c)
|
||||||
|| (c >= '\u{2e80}' && c <= '\u{2eff}') // CJK Radicals Supplement
|
|| ('\u{2e80}'..='\u{2eff}').contains(&c) // CJK Radicals Supplement
|
||||||
|| (c >= '\u{2f00}' && c <= '\u{2fdf}') // Kangxi radical
|
|| ('\u{2f00}'..='\u{2fdf}').contains(&c) // Kangxi radical
|
||||||
|| (c >= '\u{3000}' && c <= '\u{303f}') // Japanese-style punctuation
|
|| ('\u{3000}'..='\u{303f}').contains(&c) // Japanese-style punctuation
|
||||||
|| (c >= '\u{3040}' && c <= '\u{309f}') // Japanese Hiragana
|
|| ('\u{3040}'..='\u{309f}').contains(&c) // Japanese Hiragana
|
||||||
|| (c >= '\u{30a0}' && c <= '\u{30ff}') // Japanese Katakana
|
|| ('\u{30a0}'..='\u{30ff}').contains(&c) // Japanese Katakana
|
||||||
|| (c >= '\u{3100}' && c <= '\u{312f}')
|
|| ('\u{3100}'..='\u{312f}').contains(&c)
|
||||||
|| (c >= '\u{3130}' && c <= '\u{318F}') // Hangul Compatibility Jamo
|
|| ('\u{3130}'..='\u{318F}').contains(&c) // Hangul Compatibility Jamo
|
||||||
|| (c >= '\u{3200}' && c <= '\u{32ff}') // Enclosed CJK Letters and Months
|
|| ('\u{3200}'..='\u{32ff}').contains(&c) // Enclosed CJK Letters and Months
|
||||||
|| (c >= '\u{3400}' && c <= '\u{4dbf}') // CJK Unified Ideographs Extension A
|
|| ('\u{3400}'..='\u{4dbf}').contains(&c) // CJK Unified Ideographs Extension A
|
||||||
|| (c >= '\u{4e00}' && c <= '\u{9fff}') // CJK Unified Ideographs
|
|| ('\u{4e00}'..='\u{9fff}').contains(&c) // CJK Unified Ideographs
|
||||||
|| (c >= '\u{a960}' && c <= '\u{a97f}') // Hangul Jamo Extended-A
|
|| ('\u{a960}'..='\u{a97f}').contains(&c) // Hangul Jamo Extended-A
|
||||||
|| (c >= '\u{ac00}' && c <= '\u{d7a3}') // Hangul Syllables
|
|| ('\u{ac00}'..='\u{d7a3}').contains(&c) // Hangul Syllables
|
||||||
|| (c >= '\u{d7b0}' && c <= '\u{d7ff}') // Hangul Jamo Extended-B
|
|| ('\u{d7b0}'..='\u{d7ff}').contains(&c) // Hangul Jamo Extended-B
|
||||||
|| (c >= '\u{f900}' && c <= '\u{faff}') // CJK Compatibility Ideographs
|
|| ('\u{f900}'..='\u{faff}').contains(&c) // CJK Compatibility Ideographs
|
||||||
|| (c >= '\u{ff00}' && c <= '\u{ffef}') // Full-width roman characters and half-width katakana
|
|| ('\u{ff00}'..='\u{ffef}').contains(&c) // Full-width roman characters and half-width katakana
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
|
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
|
||||||
|
Loading…
Reference in New Issue
Block a user