Skip to content

Commit

Permalink
Fix linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
borntyping committed Nov 23, 2023
1 parent b93af51 commit a3ae008
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions examples/wrap.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use simple_logger::{SimpleLogger, set_up_color_terminal};
use log::{Log, Metadata, Record};
use simple_logger::{set_up_color_terminal, SimpleLogger};

struct WrapperLogger {
simple_logger: SimpleLogger
simple_logger: SimpleLogger,
}

impl Log for WrapperLogger {
Expand Down
6 changes: 4 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,9 @@ impl SimpleLogger {
levels.sort_by_key(|(name, _level)| name.len().wrapping_neg());

let max_level = self.module_levels.iter().map(|(_name, level)| level).copied().max();
max_level.map(|lvl| lvl.max(self.default_level)).unwrap_or(self.default_level)
max_level
.map(|lvl| lvl.max(self.default_level))
.unwrap_or(self.default_level)
}

/// 'Init' the actual logger and instantiate it,
Expand Down Expand Up @@ -525,7 +527,7 @@ pub fn set_up_color_terminal() {
///
/// This method does nothing if not running on Windows with the colored feature.
#[cfg(not(all(windows, feature = "colored")))]
pub fn set_up_color_terminal() { }
pub fn set_up_color_terminal() {}

/// Initialise the logger with its default configuration.
///
Expand Down

0 comments on commit a3ae008

Please sign in to comment.