mirror of
https://github.com/ziglang/zig.git
synced 2026-02-12 20:37:54 +00:00
Removed unnecessary return switch on void method
Removed an unnecessary "return switch" on the Atomic.store method
This commit is contained in:
parent
5288929ffd
commit
148e2a5a89
@ -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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user