Skip to content

Commit

Permalink
Fix some new clippies
Browse files Browse the repository at this point in the history
  • Loading branch information
emabee committed Sep 1, 2023
1 parent 0d29cd4 commit 03c9a26
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/writers/file_log_writer/state_handle.rs
Expand Up @@ -177,7 +177,7 @@ impl StateHandle {
StateHandle::Sync(handle) => {
let mut state_guard = handle.am_state.lock().map_err(|_e| io_err("Poison"))?;
let state = &mut *state_guard;
state.write_buffer(buffer).map(|_| buffer.len())
state.write_buffer(buffer).map(|()| buffer.len())
}
#[cfg(feature = "async")]
StateHandle::Async(handle) => {
Expand Down
3 changes: 2 additions & 1 deletion src/writers/syslog_writer.rs
Expand Up @@ -403,7 +403,8 @@ impl Write for SyslogConnector {
#[cfg(target_family = "unix")]
Self::Stream(ref mut w) => {
// todo: reconnect if conn is broken
w.write(buf).and_then(|sz| w.write_all(&[0; 1]).map(|_| sz))
w.write(buf)
.and_then(|sz| w.write_all(&[0; 1]).map(|()| sz))
}
Self::Tcp(ref mut w) => {
// todo: reconnect if conn is broken
Expand Down

0 comments on commit 03c9a26

Please sign in to comment.