Commit c8140a8 Thomas Bächler
committed
1 parent 98803c1 commit c8140a8 Copy full SHA for c8140a8
File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -345,7 +345,7 @@ impl SelfProfilerRef {
345
345
) {
346
346
drop ( self . exec ( event_filter, |profiler| {
347
347
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 ;
349
349
350
350
profiler. profiler . record_instant_event (
351
351
event_kind ( profiler) ,
@@ -522,7 +522,7 @@ impl<'a> TimingGuard<'a> {
522
522
event_kind : StringId ,
523
523
event_id : EventId ,
524
524
) -> 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 ;
526
526
let raw_profiler = & profiler. profiler ;
527
527
let timing_guard =
528
528
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 {
1082
1082
/// it is not guaranteed which values new threads will return, and this may
1083
1083
/// change across Rust versions.
1084
1084
#[ 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
1087
1087
}
1088
1088
}
1089
1089
You can’t perform that action at this time.
0 commit comments