From 148e2a5a89c978dab8037e08f940803ff494acbf Mon Sep 17 00:00:00 2001 From: Zachary Raineri Date: Sat, 24 Jun 2023 00:12:07 -0500 Subject: [PATCH] Removed unnecessary return switch on void method Removed an unnecessary "return switch" on the Atomic.store method --- lib/std/atomic/Atomic.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/std/atomic/Atomic.zig b/lib/std/atomic/Atomic.zig index 81918638b5..c3f17421f3 100644 --- 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 {