commit 30f8c556af59b01f3fb31d1e4bbeb33e6136fdaa
parent 7fe4f47ec395735d9534c49871469c1bea77fe26
Author: n0tr1v <n0tr1v@protonmail.com>
Date: Sat, 24 Jun 2023 15:04:57 -0700
cleanup
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go
@@ -1135,8 +1135,8 @@ func identityKeyFromAddress(onionAddr string) ed25519.PublicKey {
return decodedAddr[:32]
}
-func Slice2Set[T any, U comparable](s []T, f func(T) U) hashset.HashSet[U] {
- h := hashset.HashSet[U]{}
+func Slice2Set[T any, U comparable](s []T, f func(T) U) *hashset.HashSet[U] {
+ h := hashset.New[U]()
for _, e := range s {
h.Set(f(e))
}