-
Notifications
You must be signed in to change notification settings - Fork 734
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove dep
cfg-if
from tracing (#2553)
## Motivation Same reason as rust-lang/log#536 : `cfg_if` is only used in a single place and `tracing` is used by many other crates, so even removing one dependency will be beneficial. ## Solution Remove dependency `cfg-if` and replace `cfg_if::cfg_if!` with a `const fn get_max_level_inner() -> LevelFilter` and uses `if cfg!(...)` inside. Using if in const function is stablised in [1.46](https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1460-2020-08-27) so this should work fine in msrv 1.56 Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
- Loading branch information
Showing
2 changed files
with
29 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters