Skip to content

Commit

Permalink
refactor: hash sets without polymorphic hashing
Browse files Browse the repository at this point in the history
  • Loading branch information
rgrinberg committed Sep 25, 2024
1 parent f8014f7 commit 23d03cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/hash_set.ml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ let clear t =
;;

let add t x =
let hash = Hashtbl.hash x in
let hash = Int.hash x in
let slots = Array.length t.table in
let index = hash land (slots - 1) in
let inserting = ref true in
Expand Down Expand Up @@ -125,7 +125,7 @@ let mem t x =
then false
else (
let t = Option.get t in
let hash = Hashtbl.hash x in
let hash = Int.hash x in
let slots = Array.length t.table in
let index = hash land (slots - 1) in
let i = ref 0 in
Expand Down

0 comments on commit 23d03cb

Please sign in to comment.