From 78e6de32d781bef661eaa0f976b9b149c84ea3a7 Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Tue, 7 Jul 2026 03:36:32 +0000 Subject: [PATCH] add uint to uint64 for SafeUint64 --- units.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/units.go b/units.go index d9d84a2..38484dc 100644 --- a/units.go +++ b/units.go @@ -48,7 +48,7 @@ func FormatNumber(val uint64, base uint64) (string, string) { } // Converts int, int32, and int64 to uint64. Less than 0 check. -func SafeUint64[I int | int32 | int64](i I) uint64 { +func SafeUint64[I int | int32 | int64 | uint | uint32](i I) uint64 { if i < 0 { log.Printf("Tried to cast %d to uint64", i) return 0