Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(529)

Unified Diff: src/pkg/json/parse.go

Issue 156115: code review 156115: gofmt -r 'α[β:len(α)] -> α[β:]' -w src/cmd src/pkg (Closed)
Patch Set: code review 156115: gofmt -r 'α[β:len(α)] -> α[β:]' -w src/cmd src/pkg Created 15 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/pkg/json/generic.go ('k') | src/pkg/log/log.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pkg/json/parse.go
===================================================================
--- a/src/pkg/json/parse.go
+++ b/src/pkg/json/parse.go
@@ -101,7 +101,7 @@
return
}
r += 4;
- w += utf8.EncodeRune(rune, b[w:len(b)]);
+ w += utf8.EncodeRune(rune, b[w:]);
}
// Control characters are invalid, but we've seen raw \n.
case s[r] < ' ' && s[r] != '\n':
@@ -119,9 +119,9 @@
w++;
// Coerce to well-formed UTF-8.
default:
- rune, size := utf8.DecodeRuneInString(s[r:len(s)]);
+ rune, size := utf8.DecodeRuneInString(s[r:]);
r += size;
- w += utf8.EncodeRune(rune, b[w:len(b)]);
+ w += utf8.EncodeRune(rune, b[w:]);
}
}
return string(b[0:w]), true;
« no previous file with comments | « src/pkg/json/generic.go ('k') | src/pkg/log/log.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b