File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
library/std/src/sys/pal/unix Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -235,7 +235,7 @@ impl Thread {
235235
236236 let name = truncate_cstr :: < { VX_TASK_NAME_LEN } > ( name) ;
237237 let status = unsafe { f ( libc:: taskIdSelf ( ) , name. as_mut_ptr ( ) ) } ;
238- debug_assert_eq ! ( res , libc:: OK ) ;
238+ debug_assert_eq ! ( status , libc:: OK ) ;
239239 }
240240 }
241241
@@ -491,7 +491,9 @@ pub fn available_parallelism() -> io::Result<NonZero<usize>> {
491491
492492 // always fetches a valid bitmask
493493 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+ } )
495497 } else {
496498 // FIXME: implement on Redox, l4re
497499 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