Cargo clippy fix (#2943)

Co-authored-by: Paul Masurel <paul.masurel@datadoghq.com>
This commit is contained in:
Paul Masurel 2026-06-01 14:39:44 +02:00 committed by GitHub
commit a27c64998f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 4 additions and 10 deletions

View file

@ -121,7 +121,7 @@ pub struct FileSlice {
impl fmt::Debug for FileSlice { impl fmt::Debug for FileSlice {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "FileSlice({:?}, {:?})", &self.data, self.range) write!(f, "FileSlice({:?}, {:?})", self.data, self.range)
} }
} }

View file

@ -52,7 +52,7 @@ impl<T: FastValue> SortKeyComputer for SortByStaticFastValue<T> {
if schema_type != T::to_type() { if schema_type != T::to_type() {
return Err(crate::TantivyError::SchemaError(format!( return Err(crate::TantivyError::SchemaError(format!(
"Field `{}` is of type {schema_type:?}, not of the type {:?}.", "Field `{}` is of type {schema_type:?}, not of the type {:?}.",
&self.field, self.field,
T::to_type() T::to_type()
))); )));
} }

View file

@ -322,7 +322,7 @@ impl SegmentReader {
// Without expand dots enabled dots need to be escaped. // Without expand dots enabled dots need to be escaped.
let escaped_json_path = json_path.replace('.', "\\."); let escaped_json_path = json_path.replace('.', "\\.");
let full_path = format!("{field_name}.{escaped_json_path}"); let full_path = format!("{field_name}.{escaped_json_path}");
let full_path_unescaped = format!("{}.{}", field_name, &json_path); let full_path_unescaped = format!("{}.{}", field_name, json_path);
map_to_canonical.insert(full_path_unescaped, full_path.to_string()); map_to_canonical.insert(full_path_unescaped, full_path.to_string());
full_path full_path
} else { } else {

View file

@ -94,13 +94,7 @@ impl SkipIndex {
byte_range: 0..first_layer_len, byte_range: 0..first_layer_len,
}; };
for layer in &self.layers { for layer in &self.layers {
if let Some(checkpoint) = cur_checkpoint = layer.seek_start_at_offset(target, cur_checkpoint.byte_range.start)?;
layer.seek_start_at_offset(target, cur_checkpoint.byte_range.start)
{
cur_checkpoint = checkpoint;
} else {
return None;
}
} }
Some(cur_checkpoint) Some(cur_checkpoint)
} }