Adapt to new rustc version

This commit is contained in:
Alexander Weiss 2022-09-22 16:10:27 +02:00
parent a33395a027
commit 83ac12d5e1
4 changed files with 4 additions and 4 deletions

View File

@ -368,6 +368,6 @@ impl KeepOptions {
}
}
keep.then(|| reason)
keep.then_some(reason)
}
}

View File

@ -617,7 +617,7 @@ impl Pruner {
let max_repack = match max_repack {
LimitOption::Unlimited => u64::MAX,
LimitOption::Size(size) => size.as_u64(),
LimitOption::Percentage(p) => (p * self.stats.total_size().total()),
LimitOption::Percentage(p) => p * self.stats.total_size().total(),
};
self.repack_candidates.sort_unstable_by_key(|rc| rc.0);

View File

@ -472,7 +472,7 @@ impl FileInfos {
}
// Tell to allocate the size only if the file does NOT exist with matching size
Ok(open_file.is_none().then(|| file_pos))
Ok(open_file.is_none().then_some(file_pos))
}
fn to_packs(&self) -> Vec<Id> {

View File

@ -139,5 +139,5 @@ fn modify_sn(
}
}
changed.then(|| sn)
changed.then_some(sn)
}