diff options
author | Aaron Hill <aa1ronham@gmail.com> | 2017-09-27 20:29:44 -0400 |
---|---|---|
committer | Joe Wilm <jwilm@users.noreply.github.com> | 2017-09-27 17:29:44 -0700 |
commit | 5f7885749c4d7e48869b1fc0be4d430601cdbbfa (patch) | |
tree | 77916f2d24f71c846700139bbeaacec1f8699928 /src/logging.rs | |
parent | eb231b3e70b87875df4bdd1974d5e94704024d70 (diff) | |
download | alacritty-5f7885749c4d7e48869b1fc0be4d430601cdbbfa.tar.gz alacritty-5f7885749c4d7e48869b1fc0be4d430601cdbbfa.zip |
Use clippy = "*", update, and fix some warnings (#796)
Because there are so many clippy warnings in the current codebase,
this commit removes '#![cfg_attr(feature = "clippy", deny(clippy))]',
to make it easier to fix warnings incrementally.
Diffstat (limited to 'src/logging.rs')
-rw-r--r-- | src/logging.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/logging.rs b/src/logging.rs index f5340d05..6b7a7968 100644 --- a/src/logging.rs +++ b/src/logging.rs @@ -43,11 +43,9 @@ impl<T: Send + io::Write> log::Log for Logger<T> { } fn log(&self, record: &log::LogRecord) { - if self.enabled(record.metadata()) { - if record.target().starts_with("alacritty") { - if let Ok(ref mut writer) = self.output.lock() { - let _ = writer.write(format!("{}\n", record.args()).as_ref()); - } + if self.enabled(record.metadata()) && record.target().starts_with("alacritty") { + if let Ok(ref mut writer) = self.output.lock() { + writer.write_all(format!("{}\n", record.args()).as_ref()).expect("Error while logging!"); } } } |