Skip to content

Commit ee27af5

Browse files
committed
clippy
1 parent 49d89fd commit ee27af5

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/append/rolling_file/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,8 @@ struct LogWriter {
8888

8989
impl io::Write for LogWriter {
9090
fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
91-
self.file.write(buf).map(|n| {
91+
self.file.write(buf).inspect(|&n| {
9292
self.len += n as u64;
93-
n
9493
})
9594
}
9695

src/append/rolling_file/policy/compound/roll/fixed_window.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,9 +243,8 @@ fn rotate(
243243
move_file(src.as_ref(), dst.as_ref())?;
244244
}
245245

246-
compression.compress(&file, &dst_0).map_err(|e| {
247-
println!("err compressing: {:?}, dst: {:?}", file, dst_0);
248-
e
246+
compression.compress(&file, &dst_0).inspect_err(|e| {
247+
println!("err compressing: {:?}, dst: {:?}: {}", file, dst_0, e);
249248
})?;
250249
Ok(())
251250
}

0 commit comments

Comments
 (0)