mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-04-26 13:01:34 +03:00
std.EnumSet: add back deprecated initialization functions
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user