datastore: clippy fixes
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
abd8248520
commit
bc001e12e2
|
@ -470,7 +470,7 @@ impl DataStore {
|
|||
.recursive_iter_backup_ns(ns.to_owned())?
|
||||
.collect::<Result<Vec<BackupNamespace>, Error>>()?;
|
||||
|
||||
children.sort_by(|a, b| b.depth().cmp(&a.depth()));
|
||||
children.sort_by_key(|b| std::cmp::Reverse(b.depth()));
|
||||
|
||||
let base_file = std::fs::File::open(self.base_path())?;
|
||||
let base_fd = base_file.as_raw_fd();
|
||||
|
@ -982,8 +982,10 @@ impl DataStore {
|
|||
.oldest_writer()
|
||||
.unwrap_or(phase1_start_time);
|
||||
|
||||
let mut gc_status = GarbageCollectionStatus::default();
|
||||
gc_status.upid = Some(upid.to_string());
|
||||
let mut gc_status = GarbageCollectionStatus {
|
||||
upid: Some(upid.to_string()),
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
task_log!(worker, "Start GC phase1 (mark used chunks)");
|
||||
|
||||
|
@ -1140,8 +1142,8 @@ impl DataStore {
|
|||
self.inner.verify_new
|
||||
}
|
||||
|
||||
/// returns a list of chunks sorted by their inode number on disk
|
||||
/// chunks that could not be stat'ed are at the end of the list
|
||||
/// returns a list of chunks sorted by their inode number on disk chunks that couldn't get
|
||||
/// stat'ed are placed at the end of the list
|
||||
pub fn get_chunks_in_order<F, A>(
|
||||
&self,
|
||||
index: &Box<dyn IndexFile + Send>,
|
||||
|
|
|
@ -60,8 +60,7 @@ impl SnapshotReader {
|
|||
let mut client_log_path = snapshot_path;
|
||||
client_log_path.push(CLIENT_LOG_BLOB_NAME);
|
||||
|
||||
let mut file_list = Vec::new();
|
||||
file_list.push(MANIFEST_BLOB_NAME.to_string());
|
||||
let mut file_list = vec![MANIFEST_BLOB_NAME.to_string()];
|
||||
for item in manifest.files() {
|
||||
file_list.push(item.filename.clone());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue