From 5f7885749c4d7e48869b1fc0be4d430601cdbbfa Mon Sep 17 00:00:00 2001 From: Aaron Hill Date: Wed, 27 Sep 2017 20:29:44 -0400 Subject: 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. --- src/logging.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/logging.rs') 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 log::Log for Logger { } 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!"); } } } -- cgit v1.2.3-54-g00ecf