mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-30 00:55:00 +08:00
fix clippy
This commit is contained in:
parent
735a5da257
commit
eb4bdde432
@ -245,7 +245,7 @@ pub(crate) mod test {
|
||||
|
||||
let name = entry.file_name().into_string().unwrap();
|
||||
let file_type = entry.file_type().unwrap();
|
||||
let is_dir = file_type.is_dir().then_some("/").unwrap_or("");
|
||||
let is_dir = if file_type.is_dir() { "/" } else { "" };
|
||||
|
||||
assert!(!file_type.is_symlink());
|
||||
writeln!(ret, "{ident} {name}{is_dir}").unwrap();
|
||||
|
@ -196,7 +196,7 @@ fn snapshot_status(rtxn: &RoTxn, db: Database<SerdeBincode<Status>, RoaringBitma
|
||||
let iter = db.iter(rtxn).unwrap();
|
||||
for next in iter {
|
||||
let (status, task_ids) = next.unwrap();
|
||||
write!(snap, "{status} {}\n", snapshot_bitmap(&task_ids)).unwrap();
|
||||
writeln!(snap, "{status} {}", snapshot_bitmap(&task_ids)).unwrap();
|
||||
}
|
||||
snap
|
||||
}
|
||||
@ -207,7 +207,7 @@ fn snapshot_kind(rtxn: &RoTxn, db: Database<SerdeBincode<Kind>, RoaringBitmapCod
|
||||
for next in iter {
|
||||
let (kind, task_ids) = next.unwrap();
|
||||
let kind = serde_json::to_string(&kind).unwrap();
|
||||
write!(snap, "{kind} {}\n", snapshot_bitmap(&task_ids)).unwrap();
|
||||
writeln!(snap, "{kind} {}", snapshot_bitmap(&task_ids)).unwrap();
|
||||
}
|
||||
snap
|
||||
}
|
||||
@ -217,7 +217,7 @@ fn snapshot_index_tasks(rtxn: &RoTxn, db: Database<Str, RoaringBitmapCodec>) ->
|
||||
let iter = db.iter(rtxn).unwrap();
|
||||
for next in iter {
|
||||
let (index, task_ids) = next.unwrap();
|
||||
write!(snap, "{index} {}\n", snapshot_bitmap(&task_ids)).unwrap();
|
||||
writeln!(snap, "{index} {}", snapshot_bitmap(&task_ids)).unwrap();
|
||||
}
|
||||
snap
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user