aboutsummaryrefslogtreecommitdiff
path: root/src/identity_context.zig
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <jarred@jarredsumner.com> 2021-12-30 21:12:32 -0800
committerGravatar GitHub <noreply@github.com> 2021-12-30 21:12:32 -0800
commite75c711c68896f5952793601f156c921c814caab (patch)
treef3b30e2281c7231d480bb84503d17b2370866ff9 /src/identity_context.zig
parent8d031f13c0e04629d431176e211a31224b7618c0 (diff)
downloadbun-e75c711c68896f5952793601f156c921c814caab.tar.gz
bun-e75c711c68896f5952793601f156c921c814caab.tar.zst
bun-e75c711c68896f5952793601f156c921c814caab.zip
Upgrade to latest Zig, remove dependency on patched version of Zig (#96)
* Prepare to upgrade zig * zig fmt * AllocGate * Update data_url.zig * wip * few files * just headers now? * I think everything works? * Update mimalloc * Update hash_map.zig * Perf improvements to compensate for Allocgate * Bump * :camera: * Update bun.lockb * Less branching * [js parser] Slightly reduce memory usage * Update js_parser.zig * WIP remove unused * [JS parser] WIP support for `with` keyword * Remove more dead code * Fix all the build errors! * cleanup * Move `network_thread` up * Bump peechy * Update README.md
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;
}
};