summaryrefslogtreecommitdiff
path: root/misc.go
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@datawire.io>2022-08-16 20:14:10 -0600
committerLuke Shumaker <lukeshu@datawire.io>2022-08-16 20:15:38 -0600
commit48d7aa22ba239e4413cb7bd86e1c7ce3f64832c3 (patch)
treeb7ce019adc1f82446feae6629b2dc361ddcbe058 /misc.go
parent9f75bb80b99f94c5c87582acb99e57c232caf01d (diff)
encode: Don't use generics for encodeString
Diffstat (limited to 'misc.go')
-rw-r--r--misc.go9
1 files changed, 0 insertions, 9 deletions
diff --git a/misc.go b/misc.go
index ad69d91..dce9dac 100644
--- a/misc.go
+++ b/misc.go
@@ -36,15 +36,6 @@ var (
// generic I/O /////////////////////////////////////////////////////////////////
-func decodeRune[T interface{ []byte | string }](s T) (r rune, size int) {
- iface := any(s)
- if str, ok := iface.(string); ok {
- return utf8.DecodeRuneInString(str)
- } else {
- return utf8.DecodeRune(iface.([]byte))
- }
-}
-
func writeByte(w io.Writer, c byte) error {
if br, ok := w.(interface{ WriteByte(byte) error }); ok {
return br.WriteByte(c)