| ... | @@ -158,7 +158,7 @@ pub fn HashMap(comptime K: type, comptime V: type, comptime hash: fn (key: K) u3 | ... | @@ -158,7 +158,7 @@ pub fn HashMap(comptime K: type, comptime V: type, comptime hash: fn (key: K) u3 |
| 158 | /// Sets the capacity to the new capacity if the new | 158 | /// Sets the capacity to the new capacity if the new |
| 159 | /// capacity is greater than the current capacity. | 159 | /// capacity is greater than the current capacity. |
| 160 | /// New capacity must be a power of two. | 160 | /// New capacity must be a power of two. |
| 161 | pub fn ensureCapacityExact(self: *Self, new_capacity: usize) !void { | 161 | fn ensureCapacityExact(self: *Self, new_capacity: usize) !void { |
| 162 | const is_power_of_two = new_capacity & (new_capacity-1) == 0; | 162 | const is_power_of_two = new_capacity & (new_capacity-1) == 0; |
| 163 | assert(is_power_of_two); | 163 | assert(is_power_of_two); |
| 164 | | 164 | |