From d9f3400aba9f31204df89b73e486ae79659573d2 Mon Sep 17 00:00:00 2001 From: Henry Hrvoje Tonkovac Date: Sun, 14 Jun 2026 18:11:35 +0200 Subject: [PATCH] tracer: trim qualified paths Import the std modules used in the crate instead of spelling the full paths at every use site. Signed-off-by: Henry Hrvoje Tonkovac Assisted-by: Claude:Opus-4.8 --- tracer/src/tracer.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tracer/src/tracer.rs b/tracer/src/tracer.rs index 56694ff2b..47218f6a4 100644 --- a/tracer/src/tracer.rs +++ b/tracer/src/tracer.rs @@ -11,6 +11,7 @@ use std::fs::File; use std::io::Write; use std::sync::atomic::{AtomicU64, Ordering}; use std::sync::{Arc, Mutex}; +use std::thread; use std::time::{Duration, Instant}; use log::warn; @@ -57,7 +58,7 @@ impl Tracer { } fn add_event(&mut self, event: TraceEvent) { - let current = std::thread::current(); + let current = thread::current(); let thread_name = current.name().unwrap_or(""); let mut events = self.events.lock().unwrap(); if let Some(thread_events) = events.get_mut(thread_name) { @@ -68,7 +69,7 @@ impl Tracer { } fn increase_thread_depth(&mut self) { - let current = std::thread::current(); + let current = thread::current(); let thread_name = current.name().unwrap_or(""); if let Some(depth) = self.thread_depths.get_mut(thread_name) { depth.fetch_add(1, Ordering::SeqCst); @@ -79,7 +80,7 @@ impl Tracer { } fn decrease_thread_depth(&mut self) { - let current = std::thread::current(); + let current = thread::current(); let thread_name = current.name().unwrap_or(""); if let Some(depth) = self.thread_depths.get_mut(thread_name) { depth.fetch_sub(1, Ordering::SeqCst); @@ -89,7 +90,7 @@ impl Tracer { } fn thread_depth(&self) -> u64 { - let current = std::thread::current(); + let current = thread::current(); let thread_name = current.name().unwrap_or(""); self.thread_depths .get(thread_name)