From be878b87c2280a3289bcd27e55843dec1ed7b568 Mon Sep 17 00:00:00 2001 From: Techatrix Date: Mon, 6 Apr 2026 15:54:47 +0200 Subject: [PATCH] std.EnumSet: add back deprecated initialization functions --- lib/std/enums.zig | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/std/enums.zig b/lib/std/enums.zig index 2fafb599def3c01bd81e4be41066789afd06a459..9d9edbd7a64ea621cb5c8f0513718452ee80dd90 100644 --- 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; -- 2.54.0