File tree 1 file changed +4
-2
lines changed
library/std/src/sys/pal/unix
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -235,7 +235,7 @@ impl Thread {
235
235
236
236
let name = truncate_cstr :: < { VX_TASK_NAME_LEN } > ( name) ;
237
237
let status = unsafe { f ( libc:: taskIdSelf ( ) , name. as_mut_ptr ( ) ) } ;
238
- debug_assert_eq ! ( res , libc:: OK ) ;
238
+ debug_assert_eq ! ( status , libc:: OK ) ;
239
239
}
240
240
}
241
241
@@ -491,7 +491,9 @@ pub fn available_parallelism() -> io::Result<NonZero<usize>> {
491
491
492
492
// always fetches a valid bitmask
493
493
let set = unsafe { vxCpuEnabledGet( ) } ;
494
- Ok ( NonZero :: new_unchecked( set. count_ones( ) as usize ) )
494
+ Ok ( unsafe {
495
+ NonZero :: new_unchecked( set. count_ones( ) as usize )
496
+ } )
495
497
} else {
496
498
// FIXME: implement on Redox, l4re
497
499
Err ( io:: const_io_error!( io:: ErrorKind :: Unsupported , "Getting the number of hardware threads is not supported on the target platform" ) )
You can’t perform that action at this time.
0 commit comments