encoding/json: scanner: use byte, more consistent

The fields step and redoState of struct scanner are now defined as
`func(s *scanner, c byte) int` instead of
`func(s *scanner, c int) int`, since bytes are sufficient.
Further changes improve the consistency in the scanner.go file.

Change-Id: Ifb85f2130d728d2b936d79914d87a1f0b5c6ee7d
Reviewed-on: https://go-review.googlesource.com/14801
Reviewed-by: Andrew Gerrand <adg@golang.org>
Run-TryBot: Andrew Gerrand <adg@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Marvin Stenger 2015-09-21 00:45:21 +02:00 committed by Andrew Gerrand
parent 6d0178359f
commit fcf8143d63
5 changed files with 55 additions and 62 deletions

View file

@ -716,7 +716,7 @@ func TestErrorMessageFromMisusedString(t *testing.T) {
}
func noSpace(c rune) rune {
if isSpace(c) {
if isSpace(byte(c)) { //only used for ascii
return -1
}
return c