commit be878b87c2280a3289bcd27e55843dec1ed7b568 (tree) parent 5ec8e45f3d11265634c4943daf95f85745d17c2f Author: Techatrix <techatrix@mailbox.org> Date: Mon, 6 Apr 2026 15:54:47 +0200 std.EnumSet: add back deprecated initialization functions Diffstat:
| M | lib/std/enums.zig | | | 12 | ++++++++++++ |
1 file changed, 12 insertions(+), 0 deletions(-)
diff --git a/lib/std/enums.zig b/lib/std/enums.zig @@ -284,6 +284,18 @@ pub fn EnumSet(comptime E: type) type { /// A set containing all possible keys. pub const full: Self = .{ .bits = .full }; + /// Deprecated: use `.empty`. + /// Returns a set containing no keys. + pub fn initEmpty() Self { + return .empty; + } + + /// Deprecated: use `.full`. + /// Returns a set containing all possible keys. + pub fn initFull() Self { + return .full; + } + /// Returns a set containing multiple keys. pub fn initMany(keys: []const Key) Self { var set: Self = .empty;