fix cargo warnings

This commit is contained in:
ad hoc 2022-04-21 14:18:08 +02:00 committed by Kerollmops
parent e1e362fa43
commit 5c29258e8e
No known key found for this signature in database
GPG Key ID: 92ADA4E935E71FA4

View File

@ -100,6 +100,7 @@ impl QueryKind {
QueryKind::Exact { original_typo: 0, word }
}
#[cfg(test)]
pub fn exact_with_typo(original_typo: u8, word: String) -> Self {
QueryKind::Exact { original_typo, word }
}
@ -108,14 +109,6 @@ impl QueryKind {
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 {
match self {
QueryKind::Tolerant { typo, .. } => *typo,