diff --git a/src/lib.rs b/src/lib.rs index 1534bec..66036af 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -27,7 +27,7 @@ use std::{ thread_local! { static OUT: RefCell>> = RefCell::new(None); - static TID: RefCell> = RefCell::new(None); + static TID: RefCell> = RefCell::new(None); } type NameFn = Box) -> String + Send + Sync>; @@ -88,7 +88,7 @@ where include_args: false, include_locations: true, trace_style: TraceStyle::Threaded, - _inner: PhantomData::default(), + _inner: PhantomData, } } @@ -240,7 +240,7 @@ impl Drop for FlushGuard { } struct Callsite { - tid: u64, + tid: usize, name: String, target: String, file: Option<&'static str>, @@ -252,7 +252,7 @@ enum Message { Enter(f64, Callsite, Option), Event(f64, Callsite), Exit(f64, Callsite, Option), - NewThread(u64, String), + NewThread(usize, String), Flush, Drop, StartNew(Option>), @@ -297,7 +297,7 @@ where write.write_all(b"[\n").unwrap(); let mut has_started = false; - let mut thread_names: Vec<(u64, String)> = Vec::new(); + let mut thread_names: Vec<(usize, String)> = Vec::new(); for msg in rx { if let Message::Flush = &msg { write.flush().unwrap(); @@ -413,13 +413,13 @@ where include_args: builder.include_args, include_locations: builder.include_locations, trace_style: builder.trace_style, - _inner: PhantomData::default(), + _inner: PhantomData, }; (layer, guard) } - fn get_tid(&self) -> (u64, bool) { + fn get_tid(&self) -> (usize, bool) { TID.with(|value| { let tid = *value.borrow(); match tid {