diff options
author | Joe Wilm <joe@jwilm.com> | 2017-01-23 08:41:34 -0800 |
---|---|---|
committer | Joe Wilm <jwilm@users.noreply.github.com> | 2017-01-23 09:14:01 -0800 |
commit | abd3958cb54925935b7013555ac58ae65896f7ed (patch) | |
tree | 895e0154ab31f0897fd3849f2a8f73e3c6146577 /src/logging.rs | |
parent | db5f65637a0b061713b23c7ce5c1976f55ad8d83 (diff) | |
download | alacritty-abd3958cb54925935b7013555ac58ae65896f7ed.tar.gz alacritty-abd3958cb54925935b7013555ac58ae65896f7ed.zip |
Minor formatting fixes
Diffstat (limited to 'src/logging.rs')
-rw-r--r-- | src/logging.rs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/logging.rs b/src/logging.rs index 9037cbe9..1e6b1e42 100644 --- a/src/logging.rs +++ b/src/logging.rs @@ -22,20 +22,22 @@ use std::sync; use std::io; use cli; -pub struct Logger<T:Send+io::Write> { +pub struct Logger<T> { level: log::LogLevelFilter, output: sync::Mutex<T> } -impl<T> Logger<T> where T:Send+io::Write { +impl<T: Send + io::Write> Logger<T> { pub fn new(output: T, level: log::LogLevelFilter) -> Logger<io::LineWriter<T>> { - Logger { level: level, - output: sync::Mutex::new(io::LineWriter::new(output)) } + Logger { + level: level, + output: sync::Mutex::new(io::LineWriter::new(output)) + } } } -impl<T> log::Log for Logger<T> where T:Send+io::Write { +impl<T: Send + io::Write> log::Log for Logger<T> { fn enabled(&self, metadata: &log::LogMetadata) -> bool { metadata.level() <= self.level } |