Skip to content

Commit

Permalink
Remove intermediate MAX_LEVEL_INNER
Browse files Browse the repository at this point in the history
Drop the constant as it now seems unnecessary.

Note: this is done in a separate commit to be easy to bisect and revert.
  • Loading branch information
ptosi committed Oct 20, 2023
1 parent 296fa1a commit 05d8c46
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1480,9 +1480,7 @@ pub mod __private_api;
/// should compare the level against this value.
///
/// [`logger`]: fn.logger.html
pub const STATIC_MAX_LEVEL: LevelFilter = MAX_LEVEL_INNER;

const MAX_LEVEL_INNER: LevelFilter = match cfg!(debug_assertions) {
pub const STATIC_MAX_LEVEL: LevelFilter = match cfg!(debug_assertions) {
false if cfg!(feature = "release_max_level_off") => LevelFilter::Off,
false if cfg!(feature = "release_max_level_error") => LevelFilter::Error,
false if cfg!(feature = "release_max_level_warn") => LevelFilter::Warn,
Expand Down

0 comments on commit 05d8c46

Please sign in to comment.