commit 148e2a5a89c978dab8037e08f940803ff494acbf (tree)
parent 5288929ffd91c1fdc2237bb2574e0e0afbbc60eb
Author: Zachary Raineri <zach@raineri.software>
Date: Sat, 24 Jun 2023 00:12:07 -0500
Removed unnecessary return switch on void method
Removed an unnecessary "return switch" on the Atomic.store method
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/std/atomic/Atomic.zig b/lib/std/atomic/Atomic.zig
@@ -82,11 +82,11 @@ pub fn Atomic(comptime T: type) type {
}
pub inline fn store(self: *Self, value: T, comptime ordering: Ordering) void {
- return switch (ordering) {
+ switch (ordering) {
.AcqRel => @compileError(@tagName(ordering) ++ " implies " ++ @tagName(Ordering.Acquire) ++ " which is only allowed on atomic loads"),
.Acquire => @compileError(@tagName(ordering) ++ " is only allowed on atomic loads"),
else => @atomicStore(T, &self.value, value, ordering),
- };
+ }
}
pub inline fn swap(self: *Self, value: T, comptime ordering: Ordering) T {