Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Remove intermediate MAX_LEVEL_INNER
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
commit 05d8c46c60a48cec860d2e41da5767258923f802
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) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this will work with our MSRV?

Copy link
Contributor Author

@ptosi ptosi Oct 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, which bit?

I've checked these changes with cargo +1.60.0 test; how do you recommend I test it?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, log used to have a MSRV of 1.34 or something, but 1.60 should work 👍

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