Skip to content

Commit

Permalink
Remove unneeded ptr resolvement
Browse files Browse the repository at this point in the history
  • Loading branch information
roeldev committed Apr 7, 2024
1 parent ece06ff commit 004e2a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion decode.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func (d *Decoder) Decode(v any) error {
if rv.Kind() != reflect.Ptr || rv.IsNil() {
return errors.New(ErrStructPointerExpected)
}
if underlyingKind(rv.Type()) != reflect.Struct {
if underlyingKind(rv.Elem().Type()) != reflect.Struct {
return errors.New(ErrStructPointerExpected)
}

Expand Down

0 comments on commit 004e2a2

Please sign in to comment.