std.EnumSet: add back deprecated initialization functions

This commit is contained in:
Techatrix
2026-04-06 15:54:47 +02:00
parent 5ec8e45f3d
commit be878b87c2
+12
View File
@@ -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;