mirror of
https://github.com/duke-git/lancet.git
synced 2026-02-23 13:52:26 +08:00
feat: add Delete method for hashmap
This commit is contained in:
@@ -79,10 +79,6 @@ func (hm *HashMap) putValue(hash uint64, key, value any) any {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Delete key value in hashmap
|
// Delete key value in hashmap
|
||||||
// func (hm *HashMap) Delete(key any) {
|
|
||||||
// hm.deleteValue(hm.hash(key))
|
|
||||||
// }
|
|
||||||
|
|
||||||
func (hm *HashMap) Delete(key any) {
|
func (hm *HashMap) Delete(key any) {
|
||||||
hash := hm.hash(key)
|
hash := hm.hash(key)
|
||||||
node := hm.table[hash]
|
node := hm.table[hash]
|
||||||
|
|||||||
Reference in New Issue
Block a user