mirror of
https://github.com/quickwit-oss/tantivy.git
synced 2026-06-19 09:16:45 +00:00
Cargo clippy fix (#2943)
Co-authored-by: Paul Masurel <paul.masurel@datadoghq.com>
This commit is contained in:
parent
46b3fb9ed3
commit
a27c64998f
4 changed files with 4 additions and 10 deletions
|
|
@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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()
|
||||||
)));
|
)));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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 {
|
||||||
|
|
|
||||||
|
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue