Commit 148e2a5a89

Zachary Raineri <zach@raineri.software>
2023-06-24 07:12:07
Removed unnecessary return switch on void method
Removed an unnecessary "return switch" on the Atomic.store method
1 parent 5288929
Changed files (1)
lib
std
atomic
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 {