From db9c7fdb179f92bc6696b3d42f1142eda92d5e90 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 28 Jan 2023 22:44:07 -0700 Subject: HexToInt: No need to be generic It's only used with a rune. --- internal/hex.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/hex.go b/internal/hex.go index 9ef78eb..62a818f 100644 --- a/internal/hex.go +++ b/internal/hex.go @@ -6,7 +6,7 @@ package internal const Hex = "0123456789abcdef" -func HexToInt[T interface{ byte | rune }](c T) (byte, bool) { +func HexToInt(c rune) (byte, bool) { switch { case '0' <= c && c <= '9': return byte(c) - '0', true -- cgit v1.1-4-g5e80