We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 437fc46 commit 63cb4e3Copy full SHA for 63cb4e3
components-rs/log.rs
@@ -38,8 +38,10 @@ pub static mut ddog_log_callback: Option<extern "C" fn(CharSlice)> = None;
38
39
// Avoid RefCell for performance
40
std::thread_local! {
41
- static LOGGED_MSGS: RefCell<BTreeSet<String>> = RefCell::default();
42
- static TRACING_GUARDS: RefCell<Option<tracing_core::dispatcher::DefaultGuard>> = RefCell::default();
+ static LOGGED_MSGS: RefCell<BTreeSet<String>> = const { RefCell::new(BTreeSet::new()) };
+ static TRACING_GUARDS: RefCell<Option<tracing_core::dispatcher::DefaultGuard>> = const { RefCell::new(None) };
43
+
44
+ // todo: MSRV 1.85+ make this const with HashMap::with_hasher
45
static COUNTERS: RefCell<HashMap<Level, u32>> = RefCell::default();
46
}
47
0 commit comments