move hide behind @ and specify with :

This commit is contained in:
2026-08-10 22:45:41 +02:00
parent 5244bfbf1b
commit ba6052eef3
27 changed files with 162 additions and 149 deletions
+3 -3
View File
@@ -134,7 +134,7 @@ put func(
}
}
hide normalize func(hash usize) usize {
@hide normalize func(hash usize) usize {
# mapping both 0 and 1 to 1 is safe because equality resolves
# collisions (since hash and key must both be equal).
if (hash == 0) return 1
@@ -143,7 +143,7 @@ hide normalize func(hash usize) usize {
#! FNV-1a hash implementation.
#! note: vulnerable to collision attacks.
hide str_hash func(key []u8) usize {
@hide str_hash func(key []u8) usize {
hash u32 := 2166136261 # offset basis
prime u32 := 16777619
@@ -155,6 +155,6 @@ hide str_hash func(key []u8) usize {
return usize(hash)
}
hide str_eql func(a, b []u8) bool {
@hide str_eql func(a, b []u8) bool {
return mem.eql(a, b)
}