commit | 51d99d15085f642f84d8e8be4de92e870499243d | [log] [tgz] |
---|---|---|
author | Mitchell Hashimoto <mitchell.hashimoto@gmail.com> | Sun May 17 18:15:24 2015 -0700 |
committer | Mitchell Hashimoto <mitchell.hashimoto@gmail.com> | Sun May 17 18:15:24 2015 -0700 |
tree | 216d3e46b0fc5ecff6efe189c6a084d03d61df31 | |
parent | 4ba679266105a0f698522c2c61bf61a43cc62a66 [diff] |
simplify code a bit
diff --git a/decode_hooks.go b/decode_hooks.go index e5a949b..9cdc2c9 100644 --- a/decode_hooks.go +++ b/decode_hooks.go
@@ -21,8 +21,7 @@ v := reflect.ValueOf(h) vt := v.Type() for _, raw := range potential { - p := reflect.ValueOf(raw) - pt := p.Type() + pt := reflect.ValueOf(raw).Type() if vt.ConvertibleTo(pt) { return v.Convert(pt).Interface() }