Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Commit

Permalink
fix cargo warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
MarinPostma authored and Kerollmops committed Apr 26, 2022
1 parent e1e362f commit 5c29258
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions milli/src/search/query_tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
}
Expand All @@ -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,
Expand Down

0 comments on commit 5c29258

Please sign in to comment.