mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-30 17:14:59 +08:00
Merge #506
506: fix cargo warnings r=Kerollmops a=MarinPostma fix cargo warnings Co-authored-by: ad hoc <postma.marin@protonmail.com>
This commit is contained in:
commit
d388ea0f9d
@ -100,6 +100,7 @@ impl QueryKind {
|
|||||||
QueryKind::Exact { original_typo: 0, word }
|
QueryKind::Exact { original_typo: 0, word }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
pub fn exact_with_typo(original_typo: u8, word: String) -> Self {
|
pub fn exact_with_typo(original_typo: u8, word: String) -> Self {
|
||||||
QueryKind::Exact { original_typo, word }
|
QueryKind::Exact { original_typo, word }
|
||||||
}
|
}
|
||||||
@ -108,14 +109,6 @@ impl QueryKind {
|
|||||||
QueryKind::Tolerant { typo, word }
|
QueryKind::Tolerant { typo, word }
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn is_tolerant(&self) -> bool {
|
|
||||||
matches!(self, QueryKind::Tolerant { .. })
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn is_exact(&self) -> bool {
|
|
||||||
matches!(self, QueryKind::Exact { .. })
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn typo(&self) -> u8 {
|
pub fn typo(&self) -> u8 {
|
||||||
match self {
|
match self {
|
||||||
QueryKind::Tolerant { typo, .. } => *typo,
|
QueryKind::Tolerant { typo, .. } => *typo,
|
||||||
|
Loading…
Reference in New Issue
Block a user