diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2023-01-28 22:44:07 -0700 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2023-01-29 02:14:51 -0700 |
commit | db9c7fdb179f92bc6696b3d42f1142eda92d5e90 (patch) | |
tree | a23480641dac7d4099dd5d6ca8d2e66a42b0f789 /internal | |
parent | 636311bafdb18da9851a668317a8d792f38ead5b (diff) |
HexToInt: No need to be generic
It's only used with a rune.
Diffstat (limited to 'internal')
-rw-r--r-- | internal/hex.go | 2 |
1 files changed, 1 insertions, 1 deletions
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 |