Skip to content

Commit

Permalink
fix tests and more links
Browse files Browse the repository at this point in the history
  • Loading branch information
guswynn committed Feb 1, 2022
1 parent 27da31b commit f2c90b6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion tracing-core/src/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ impl Kind {
/// `Span` callsite
pub const SPAN: Kind = Kind(KindInner::Span);

/// `enabled!` callsite. [`Collect`][`crate::collect::Collect`]s can assume
/// `enabled!` callsite. [`Subscriber`][`crate::subscriber::Subscriber`]s can assume
/// this `Kind` means they will never recieve a
/// full event with this [`Metadata`].
pub const HINT: Kind = Kind(KindInner::Hint);
Expand Down
8 changes: 2 additions & 6 deletions tracing/tests/enabled.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
// liballoc is required because the test subscriber cannot be constructed
// statically
#![cfg(feature = "alloc")]

mod support;

use self::support::*;
Expand All @@ -10,7 +6,7 @@ use tracing::Level;
#[cfg_attr(target_arch = "wasm32", wasm_bindgen_test::wasm_bindgen_test)]
#[test]
fn level_and_target() {
let (collector, handle) = collector::mock()
let (subscriber, handle) = subscriber::mock()
.with_filter(|meta| {
if meta.target() == "debug_module" {
meta.level() <= &Level::DEBUG
Expand All @@ -21,7 +17,7 @@ fn level_and_target() {
.done()
.run_with_handle();

tracing::collect::set_global_default(collector).unwrap();
tracing::subscriber::set_global_default(subscriber).unwrap();

assert!(tracing::enabled!(target: "debug_module", Level::DEBUG));
assert!(tracing::enabled!(Level::ERROR));
Expand Down

0 comments on commit f2c90b6

Please sign in to comment.