alphadose / haxmap

Fastest and most memory efficient golang concurrent hashmap
MIT License
915 stars 45 forks source link

Fix misuse of reflect.SliceHeader #3

Closed cuonglm closed 2 years ago

cuonglm commented 2 years ago

Per https://pkg.go.dev/unsafe rule 6thm reflect.SliceHeader should never be used as a plain struct. Instead, use unsafe.Slice which is a safer way to construct slice unsafely.

alphadose commented 2 years ago

@cuonglm can you run go test *.go in your branch ?

cuonglm commented 2 years ago

@cuonglm can you run go test *.go in your branch ?

Test passes!

$ go1.19 test
PASS
ok      github.com/alphadose/haxmap 4.697s