migration: std.math.{min, min3, max, max3} -> @min & @max
This commit is contained in:
@@ -815,9 +815,9 @@ pub fn ArrayHashMapUnmanaged(
|
||||
/// no longer guaranteed that no allocations will be performed.
|
||||
pub fn capacity(self: Self) usize {
|
||||
const entry_cap = self.entries.capacity;
|
||||
const header = self.index_header orelse return math.min(linear_scan_max, entry_cap);
|
||||
const header = self.index_header orelse return @min(linear_scan_max, entry_cap);
|
||||
const indexes_cap = header.capacity();
|
||||
return math.min(entry_cap, indexes_cap);
|
||||
return @min(entry_cap, indexes_cap);
|
||||
}
|
||||
|
||||
/// Clobbers any existing data. To detect if a put would clobber
|
||||
@@ -1821,7 +1821,7 @@ fn Index(comptime I: type) type {
|
||||
/// length * the size of an Index(u32). The index is 8 bytes (3 bits repr)
|
||||
/// and max_usize + 1 is not representable, so we need to subtract out 4 bits.
|
||||
const max_representable_index_len = @bitSizeOf(usize) - 4;
|
||||
const max_bit_index = math.min(32, max_representable_index_len);
|
||||
const max_bit_index = @min(32, max_representable_index_len);
|
||||
const min_bit_index = 5;
|
||||
const max_capacity = (1 << max_bit_index) - 1;
|
||||
const index_capacities = blk: {
|
||||
|
||||
Reference in New Issue
Block a user