fix clippy

This commit is contained in:
Irevoire 2022-10-22 17:17:09 +02:00 committed by Clément Renault
parent 735a5da257
commit eb4bdde432
No known key found for this signature in database
GPG Key ID: 92ADA4E935E71FA4
2 changed files with 4 additions and 4 deletions

View File

@ -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();

View File

@ -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
}