This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -345,7 +345,7 @@ impl SelfProfilerRef {
345345 ) {
346346 drop ( self . exec ( event_filter, |profiler| {
347347 let event_id = StringId :: new_virtual ( query_invocation_id. 0 ) ;
348- let thread_id = std:: thread:: current ( ) . id ( ) . as_u64 ( ) as u32 ;
348+ let thread_id = std:: thread:: current ( ) . id ( ) . as_u64 ( ) . get ( ) as u32 ;
349349
350350 profiler. profiler . record_instant_event (
351351 event_kind ( profiler) ,
@@ -522,7 +522,7 @@ impl<'a> TimingGuard<'a> {
522522 event_kind : StringId ,
523523 event_id : EventId ,
524524 ) -> TimingGuard < ' a > {
525- let thread_id = std:: thread:: current ( ) . id ( ) . as_u64 ( ) as u32 ;
525+ let thread_id = std:: thread:: current ( ) . id ( ) . as_u64 ( ) . get ( ) as u32 ;
526526 let raw_profiler = & profiler. profiler ;
527527 let timing_guard =
528528 raw_profiler. start_recording_interval_event ( event_kind, event_id, thread_id) ;
Original file line number Diff line number Diff line change @@ -1082,8 +1082,8 @@ impl ThreadId {
10821082 /// it is not guaranteed which values new threads will return, and this may
10831083 /// change across Rust versions.
10841084 #[ unstable( feature = "thread_id_value" , issue = "67939" ) ]
1085- pub fn as_u64 ( & self ) -> u64 {
1086- self . 0 . get ( )
1085+ pub fn as_u64 ( & self ) -> NonZeroU64 {
1086+ self . 0
10871087 }
10881088}
10891089
You can’t perform that action at this time.
0 commit comments