Remove unnecessary conversions (#315)
Found with github.com/mdempsky/unconvert.
/Users/tamird/src/go/src/github.com/golang/protobuf/jsonpb/jsonpb.go:625:32: unnecessary conversion
/Users/tamird/src/go/src/github.com/golang/protobuf/proto/encode.go:177:30: unnecessary conversion
/Users/tamird/src/go/src/github.com/golang/protobuf/proto/encode.go:181:26: unnecessary conversion
/Users/tamird/src/go/src/github.com/golang/protobuf/proto/text_parser.go:868:21: unnecessary conversion
diff --git a/proto/text_parser.go b/proto/text_parser.go
index 61f83c1..5e14513 100644
--- a/proto/text_parser.go
+++ b/proto/text_parser.go
@@ -865,7 +865,7 @@
return p.readStruct(fv, terminator)
case reflect.Uint32:
if x, err := strconv.ParseUint(tok.value, 0, 32); err == nil {
- fv.SetUint(uint64(x))
+ fv.SetUint(x)
return nil
}
case reflect.Uint64: