mirror of
https://github.com/rustic-rs/rustic.git
synced 2025-10-26 11:18:51 +00:00
Merge pull request #227 from rustic-rs/update-rustc
Adapt to new rustc version
This commit is contained in:
commit
ad4e7459f8
@ -368,6 +368,6 @@ impl KeepOptions {
|
||||
}
|
||||
}
|
||||
|
||||
keep.then(|| reason)
|
||||
keep.then_some(reason)
|
||||
}
|
||||
}
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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> {
|
||||
|
||||
@ -139,5 +139,5 @@ fn modify_sn(
|
||||
}
|
||||
}
|
||||
|
||||
changed.then(|| sn)
|
||||
changed.then_some(sn)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user