Skip to content

Commit a2a6d20

Browse files
cuiweixienblock
authored andcommitted
Refactor to use reflect.TypeFor
1 parent d29feae commit a2a6d20

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hscontrol/db/text_serialiser.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
)
1111

1212
// Got from https://github.com/xdg-go/strum/blob/main/types.go
13-
var textUnmarshalerType = reflect.TypeOf((*encoding.TextUnmarshaler)(nil)).Elem()
13+
var textUnmarshalerType = reflect.TypeFor[encoding.TextUnmarshaler]()
1414

1515
func isTextUnmarshaler(rv reflect.Value) bool {
1616
return rv.Type().Implements(textUnmarshalerType)

0 commit comments

Comments
 (0)