mirror of
https://github.com/tokio-rs/tracing.git
synced 2025-09-28 21:42:15 +00:00
core: make Level and LevelFilter Hash (#1456)
Fixes: #1376 Co-authored-by: Eliza Weisman <eliza@buoyant.io>
This commit is contained in:
parent
494cf1b7b5
commit
504bb3ee9a
@ -219,7 +219,7 @@ pub struct Kind(KindInner);
|
||||
/// [`Subscriber::max_level_hint`]: crate::subscriber::Subscriber::max_level_hint
|
||||
/// [subscriber]: crate::subscriber::Subscriber
|
||||
/// [envfilter]: https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
|
||||
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
|
||||
pub struct Level(LevelInner);
|
||||
|
||||
/// A filter comparable to a verbosity [`Level`].
|
||||
@ -236,7 +236,7 @@ pub struct Level(LevelInner);
|
||||
///
|
||||
/// [`OFF`]: LevelFilter::OFF
|
||||
#[repr(transparent)]
|
||||
#[derive(Copy, Clone, Eq, PartialEq)]
|
||||
#[derive(Copy, Clone, Eq, PartialEq, Hash)]
|
||||
pub struct LevelFilter(Option<Level>);
|
||||
|
||||
/// Indicates that a string could not be parsed to a valid level.
|
||||
|
Loading…
x
Reference in New Issue
Block a user