diff options
| author | JonathanHallstrom <lmj.hallstrom@gmail.com> | 2024-10-27 09:40:56 +0100 |
|---|---|---|
| committer | Alex Rønne Petersen <alex@alexrp.com> | 2024-10-29 01:48:13 +0100 |
| commit | 5ce17ecfa79b296577230a204895e52c0a738a11 (patch) | |
| tree | ccbe1a08fb8094a64c3ddeb06c88d98c743d5967 /lib/std/Thread.zig | |
| parent | d22049a987493d1cb64d54829dc042726d6cc2de (diff) | |
| download | zig-5ce17ecfa79b296577230a204895e52c0a738a11.tar.gz zig-5ce17ecfa79b296577230a204895e52c0a738a11.zip | |
remove unnecessary cast
Diffstat (limited to 'lib/std/Thread.zig')
| -rw-r--r-- | lib/std/Thread.zig | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/std/Thread.zig b/lib/std/Thread.zig index 21a77b0d63..0244eb6d41 100644 --- a/lib/std/Thread.zig +++ b/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, |
