Skip to content

Commit

Permalink
fix linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
cristiano-prato committed Jul 17, 2024
1 parent 9a6e736 commit 8c7cade
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/append/rolling_file/policy/compound/roll/fixed_window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ impl Compression {
drop(i); // needs to happen before remove_file call on Windows

fs::remove_file(src)
},
}
#[cfg(feature = "zstd")]
Compression::Zstd => {
use std::fs::File;
Expand Down Expand Up @@ -289,13 +289,13 @@ impl FixedWindowRollerBuilder {
#[cfg(not(feature = "gzip"))]
Some(e) if e == "gz" => {
bail!("gzip compression requires the `gzip` feature");
},
}
#[cfg(feature = "zstd")]
Some(e) if e == "zst" => Compression::Zstd,
#[cfg(not(feature = "zstd"))]
Some(e) if e == "zst" => {
bail!("zstd compression requires the `zstd` feature");
},
}
_ => Compression::None,
};

Expand Down Expand Up @@ -587,8 +587,7 @@ mod test {
let dir = tempfile::tempdir().unwrap();

let pattern = dir.path().join("{}.zst");
let roller = FixedWindowRoller::builder()
.build(pattern.to_str().unwrap(), 2);
let roller = FixedWindowRoller::builder().build(pattern.to_str().unwrap(), 2);
assert!(roller.is_err());
assert!(roller
.unwrap_err()
Expand Down

0 comments on commit 8c7cade

Please sign in to comment.