Skip to content

Commit

Permalink
core: fix incorrect (incorrectly updated) docs for LevelFilter (tokio…
Browse files Browse the repository at this point in the history
…-rs#2767)

These docs were updated (in response to tokio-rs#1669), but the "or equal to"
phrase should have been moved to the other case.

Fixes: tokio-rs#1993

## Motivation

When these docs were updated in response to tokio-rs#1669, they were updated
incompletely (a level that is equal to a filter is _enabled_, not
_disabled_) and therefore remained incorrect.

## Solution

The docs were updated, moving the "or equal to" phrase to the other
case.
  • Loading branch information
maddiemort authored and kaffarell committed Feb 14, 2024
1 parent d17f3e9 commit 5a2fc1c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tracing-core/src/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,9 @@ pub struct Level(LevelInner);

/// A filter comparable to a verbosity [`Level`].
///
/// If a [`Level`] is considered less than a `LevelFilter`, it should be
/// considered enabled; if greater than or equal to the `LevelFilter`,
/// that level is disabled. See [`LevelFilter::current`] for more
/// details.
/// If a [`Level`] is considered less than or equal to a `LevelFilter`, it
/// should be considered enabled; if greater than the `LevelFilter`, that level
/// is disabled. See [`LevelFilter::current`] for more details.
///
/// Note that this is essentially identical to the `Level` type, but with the
/// addition of an [`OFF`] level that completely disables all trace
Expand Down

0 comments on commit 5a2fc1c

Please sign in to comment.