mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2025-09-20 12:35:59 +08:00
14 lines
237 B
Go
14 lines
237 B
Go
//go:build go1.24
|
|
|
|
package maphash
|
|
|
|
import "hash/maphash"
|
|
|
|
func Comparable[T comparable](seed Seed, v T) uint64 {
|
|
return maphash.Comparable(seed, v)
|
|
}
|
|
|
|
func WriteComparable[T comparable](h *Hash, x T) {
|
|
maphash.WriteComparable(h, x)
|
|
}
|