aboutsummaryrefslogtreecommitdiff
path: root/src/identity_context.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/identity_context.zig')
-rw-r--r--src/identity_context.zig8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/identity_context.zig b/src/identity_context.zig
index eefdca6b5..b28cac1cc 100644
--- a/src/identity_context.zig
+++ b/src/identity_context.zig
@@ -1,10 +1,10 @@
pub fn IdentityContext(comptime Key: type) type {
return struct {
- pub fn hash(this: @This(), key: Key) u64 {
+ pub fn hash(_: @This(), key: Key) u64 {
return key;
}
- pub fn eql(this: @This(), a: Key, b: Key) bool {
+ pub fn eql(_: @This(), a: Key, b: Key) bool {
return a == b;
}
};
@@ -13,11 +13,11 @@ pub fn IdentityContext(comptime Key: type) type {
/// When storing hashes as keys in a hash table, we don't want to hash the hashes or else we increase the chance of collisions. This is also marginally faster since it means hashing less stuff.
/// `ArrayIdentityContext` and `IdentityContext` are distinct because ArrayHashMap expects u32 hashes but HashMap expects u64 hashes.
const ArrayIdentityContext = struct {
- pub fn hash(this: @This(), key: u32) u32 {
+ pub fn hash(_: @This(), key: u32) u32 {
return key;
}
- pub fn eql(this: @This(), a: u32, b: u32) bool {
+ pub fn eql(_: @This(), a: u32, b: u32) bool {
return a == b;
}
};