commit 367be3777c7dcdd8ca19de0b2a8e2dc4b91486e0 (tree)
parent e351ee3b7f3eb2023b8c391b0db2655707183e62
Author: Alex Rønne Petersen <alex@alexrp.com>
Date: Mon, 4 Aug 2025 20:46:40 +0200
std.Thread: make unreachable errors in sleep() clearer
Diffstat:
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/lib/std/Thread.zig b/lib/std/Thread.zig
@@ -83,10 +83,9 @@ pub fn sleep(nanoseconds: u64) void {
req = rem;
continue;
},
- .FAULT,
- .INVAL,
- .OPNOTSUPP,
- => unreachable,
+ .FAULT => unreachable,
+ .INVAL => unreachable,
+ .OPNOTSUPP => unreachable,
else => return,
}
}