Skip to content

Commit cffcf45

Browse files
committed
Fix clippy warning from rust 1.81
1 parent ffc7943 commit cffcf45

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

mithril-aggregator/src/snapshotter.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ pub enum SnapshotError {
9494
impl Snapshotter for CompressedArchiveSnapshotter {
9595
fn snapshot(&self, archive_name: &str) -> StdResult<OngoingSnapshot> {
9696
let archive_path = self.ongoing_snapshot_directory.join(archive_name);
97-
let filesize = self.create_and_verify_archive(&archive_path).map_err(|err| {
97+
let filesize = self.create_and_verify_archive(&archive_path).inspect_err(|_err| {
9898
if archive_path.exists() {
9999
if let Err(remove_error) = std::fs::remove_file(&archive_path) {
100100
warn!(
@@ -104,8 +104,6 @@ impl Snapshotter for CompressedArchiveSnapshotter {
104104
);
105105
}
106106
}
107-
108-
err
109107
}).with_context(|| format!("CompressedArchiveSnapshotter can not create and verify archive: '{}'", archive_path.display()))?;
110108

111109
Ok(OngoingSnapshot {

0 commit comments

Comments
 (0)