@@ -201,8 +201,7 @@ pub fn ArrayHashMap(
|
||||
return self.unmanaged.getOrPutValueContext(self.allocator, key, value, self.ctx);
|
||||
}
|
||||
|
||||
/// Deprecated: call `ensureUnusedCapacity` or `ensureTotalCapacity`.
|
||||
pub const ensureCapacity = ensureTotalCapacity;
|
||||
pub const ensureCapacity = @compileError("deprecated; call `ensureUnusedCapacity` or `ensureTotalCapacity`");
|
||||
|
||||
/// Increases capacity, guaranteeing that insertions up until the
|
||||
/// `expected_count` will not cause an allocation, and therefore cannot fail.
|
||||
@@ -746,8 +745,7 @@ pub fn ArrayHashMapUnmanaged(
|
||||
return res;
|
||||
}
|
||||
|
||||
/// Deprecated: call `ensureUnusedCapacity` or `ensureTotalCapacity`.
|
||||
pub const ensureCapacity = ensureTotalCapacity;
|
||||
pub const ensureCapacity = @compileError("deprecated; call `ensureUnusedCapacity` or `ensureTotalCapacity`");
|
||||
|
||||
/// Increases capacity, guaranteeing that insertions up until the
|
||||
/// `expected_count` will not cause an allocation, and therefore cannot fail.
|
||||
@@ -2217,17 +2215,6 @@ test "auto store_hash" {
|
||||
try testing.expect(meta.fieldInfo(HasExpensiveEqlUn.Data, .hash).field_type != void);
|
||||
}
|
||||
|
||||
test "compile everything" {
|
||||
std.testing.refAllDecls(AutoArrayHashMap(i32, i32));
|
||||
std.testing.refAllDecls(StringArrayHashMap([]const u8));
|
||||
std.testing.refAllDecls(AutoArrayHashMap(i32, void));
|
||||
std.testing.refAllDecls(StringArrayHashMap(u0));
|
||||
std.testing.refAllDecls(AutoArrayHashMapUnmanaged(i32, i32));
|
||||
std.testing.refAllDecls(StringArrayHashMapUnmanaged([]const u8));
|
||||
std.testing.refAllDecls(AutoArrayHashMapUnmanaged(i32, void));
|
||||
std.testing.refAllDecls(StringArrayHashMapUnmanaged(u0));
|
||||
}
|
||||
|
||||
pub fn getHashPtrAddrFn(comptime K: type, comptime Context: type) (fn (Context, K) u32) {
|
||||
return struct {
|
||||
fn hash(ctx: Context, key: K) u32 {
|
||||
|
||||
Reference in New Issue
Block a user