mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2026-02-26 16:57:08 +00:00
16 lines
277 B
Go
16 lines
277 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)
|
|
}
|
|
|
|
const testComparableAllocations = true
|