Commit 5ce17ecfa7

JonathanHallstrom <lmj.hallstrom@gmail.com>
2024-10-27 09:40:56
remove unnecessary cast
1 parent d22049a
Changed files (1)
lib
lib/std/Thread.zig
@@ -1141,8 +1141,7 @@ const LinuxThreadImpl = struct {
 
     fn getCpuCount() !usize {
         const cpu_set = try posix.sched_getaffinity(0);
-        // TODO: should not need this usize cast
-        return @as(usize, posix.CPU_COUNT(cpu_set));
+        return posix.CPU_COUNT(cpu_set);
     }
 
     thread: *ThreadCompletion,