mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
Fixes for clippy bringing us down to 18 remaining issues.
This brings us a step closer to enforcing clippy on each build.
This commit is contained in:
parent
004c09a8e2
commit
6b2fe94192
26 changed files with 117 additions and 131 deletions
|
@ -34,7 +34,7 @@ where
|
|||
type EItem = (&'a str, C::EItem);
|
||||
|
||||
fn bytes_encode((string, value): &'a Self::EItem) -> Option<Cow<[u8]>> {
|
||||
let value_bytes = C::bytes_encode(&value)?;
|
||||
let value_bytes = C::bytes_encode(value)?;
|
||||
|
||||
let mut bytes = Vec::with_capacity(2 + string.len() + value_bytes.len());
|
||||
encode_prefix_string(string, &mut bytes).ok()?;
|
||||
|
|
|
@ -66,14 +66,14 @@ where
|
|||
bytes.extend_from_slice(left.as_bytes());
|
||||
bytes.extend_from_slice(right.as_bytes());
|
||||
|
||||
let value_bytes = C::bytes_encode(&value)?;
|
||||
let value_bytes = C::bytes_encode(value)?;
|
||||
bytes.extend_from_slice(&value_bytes[..]);
|
||||
|
||||
Some(Cow::Owned(bytes))
|
||||
}
|
||||
None => {
|
||||
bytes.push(0);
|
||||
let value_bytes = C::bytes_encode(&value)?;
|
||||
let value_bytes = C::bytes_encode(value)?;
|
||||
bytes.extend_from_slice(&value_bytes[..]);
|
||||
Some(Cow::Owned(bytes))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue