From ef24de24a82fe681581cc130f342363c47c0969a Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 7 Jun 2024 07:48:48 +0200 Subject: Merging upstream version 1.75.0+dfsg1. Signed-off-by: Daniel Baumann --- vendor/tracing/tests/no_subscriber.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'vendor/tracing/tests/no_subscriber.rs') diff --git a/vendor/tracing/tests/no_subscriber.rs b/vendor/tracing/tests/no_subscriber.rs index 5f927c1de..d15a2c8a1 100644 --- a/vendor/tracing/tests/no_subscriber.rs +++ b/vendor/tracing/tests/no_subscriber.rs @@ -1,14 +1,15 @@ #![cfg(feature = "std")] -use tracing::subscriber::{self, NoSubscriber}; +use tracing_mock::subscriber; #[cfg_attr(target_arch = "wasm32", wasm_bindgen_test::wasm_bindgen_test)] #[test] fn no_subscriber_disables_global() { // Reproduces https://github.com/tokio-rs/tracing/issues/1999 - let (subscriber, handle) = tracing_mock::subscriber::mock().done().run_with_handle(); - subscriber::set_global_default(subscriber).expect("setting global default must succeed"); - subscriber::with_default(NoSubscriber::default(), || { + let (subscriber, handle) = subscriber::mock().only().run_with_handle(); + tracing::subscriber::set_global_default(subscriber) + .expect("setting global default must succeed"); + tracing::subscriber::with_default(tracing::subscriber::NoSubscriber::default(), || { tracing::info!("this should not be recorded"); }); handle.assert_finished(); -- cgit v1.2.3