Skip to content

Commit

Permalink
Fix clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
TehPers committed Nov 9, 2021
1 parent 0e26ae9 commit 5d56016
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ impl LogSource for StdinLogSource {
.stdin
.fill_buf()
.ok()
.filter(|buf| buf.len() > 0)
.filter(|buf| !buf.is_empty())
.is_none();
if bytes_available {
// No changes
Expand All @@ -111,7 +111,9 @@ impl LogSource for StdinLogSource {

// Append to the log file
let mut raw = log.raw().to_string();
let _ = self.stdin.read_to_string(&mut raw);
self.stdin
.read_to_string(&mut raw)
.context("error reading from stdin")?;
Log::parse(raw).context("error parsing log").map(Some)
}
}

0 comments on commit 5d56016

Please sign in to comment.