mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
chore: Do a little clippy pass
This commit is contained in:
parent
34ba520f44
commit
102fb506db
7 changed files with 15 additions and 24 deletions
|
@ -22,7 +22,6 @@ pub use self::{
|
|||
pub trait Criterion: Send + Sync {
|
||||
fn evaluate(&self, lhs: &RawDocument, rhs: &RawDocument) -> Ordering;
|
||||
|
||||
#[inline]
|
||||
fn name(&self) -> &'static str;
|
||||
|
||||
#[inline]
|
||||
|
|
|
@ -12,7 +12,7 @@ impl<K: Hash + Eq> DistinctMap<K> {
|
|||
pub fn new(limit: usize) -> Self {
|
||||
DistinctMap {
|
||||
inner: HashMap::new(),
|
||||
limit: limit,
|
||||
limit,
|
||||
len: 0,
|
||||
}
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ pub struct BufferedDistinctMap<'a, K> {
|
|||
impl<'a, K: Hash + Eq> BufferedDistinctMap<'a, K> {
|
||||
pub fn new(internal: &'a mut DistinctMap<K>) -> BufferedDistinctMap<'a, K> {
|
||||
BufferedDistinctMap {
|
||||
internal: internal,
|
||||
internal,
|
||||
inner: HashMap::new(),
|
||||
len: 0,
|
||||
}
|
||||
|
|
|
@ -69,11 +69,7 @@ impl<'c, S, FI> QueryBuilder<'c, S, FI>
|
|||
where F: Fn(DocumentId) -> Option<K>,
|
||||
K: Hash + Eq,
|
||||
{
|
||||
DistinctQueryBuilder {
|
||||
inner: self,
|
||||
function: function,
|
||||
size: size
|
||||
}
|
||||
DistinctQueryBuilder { inner: self, function, size }
|
||||
}
|
||||
|
||||
pub fn add_searchable_attribute(&mut self, attribute: u16) {
|
||||
|
@ -116,10 +112,10 @@ where S: Store,
|
|||
if self.searchable_attrs.as_ref().map_or(true, |r| r.contains(&di.attribute)) {
|
||||
let match_ = Match {
|
||||
query_index: iv.index as u32,
|
||||
distance: distance,
|
||||
distance,
|
||||
attribute: di.attribute,
|
||||
word_index: di.word_index,
|
||||
is_exact: is_exact,
|
||||
is_exact,
|
||||
char_index: di.char_index,
|
||||
char_length: di.char_length,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue