aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLemonBoy <thatlemon@gmail.com>2020-02-29 23:11:36 +0100
committerLemonBoy <thatlemon@gmail.com>2020-02-29 23:11:36 +0100
commit845af5c55208753dc355fad734a8c4893338f8f6 (patch)
tree17a0db9969c843926d7541bdbdfa73fd35c7f978 /lib
parent3b29a72b3b59803307e9040a6832e579901211f3 (diff)
downloadzig-845af5c55208753dc355fad734a8c4893338f8f6.tar.gz
zig-845af5c55208753dc355fad734a8c4893338f8f6.zip
Handle one more error
Diffstat (limited to 'lib')
-rw-r--r--lib/std/thread.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/thread.zig b/lib/std/thread.zig
index 55db9d1733..de9d580af7 100644
--- a/lib/std/thread.zig
+++ b/lib/std/thread.zig
@@ -382,7 +382,7 @@ pub const Thread = struct {
var count_len: usize = @sizeOf(c_int);
const name = if (comptime std.Target.current.isDarwin()) "hw.logicalcpu" else "hw.ncpu";
os.sysctlbynameC(name, &count, &count_len, null, 0) catch |err| switch (err) {
- error.NameTooLong => unreachable,
+ error.NameTooLong, error.UnknownName => unreachable,
else => |e| return e,
};
return @intCast(usize, count);