aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYang Zhang <yang_zhang@iapcm.ac.cn>2018-12-31 09:02:35 +0800
committerYang Zhang <yang_zhang@iapcm.ac.cn>2018-12-31 09:02:35 +0800
commit99bc0c140a5023ff92d523cbdc086df18dca6379 (patch)
tree5293e08b84755b415a7876f47cd2ee3ba6369890
parenta0ae5fc5349063fb9b0a3de04be555b3757c1f4b (diff)
downloadgit-bug-99bc0c140a5023ff92d523cbdc086df18dca6379.tar.gz
Fix megacheck warnings
-rw-r--r--util/text/text.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/text/text.go b/util/text/text.go
index f8062bc6..f2a0877e 100644
--- a/util/text/text.go
+++ b/util/text/text.go
@@ -88,7 +88,7 @@ func replayTermEscape(s string, sequence []EscapeItem) string {
currPos := 0
currItem := 0
- for _, r := range []rune(s) {
+ for _, r := range s {
if currItem < len(sequence) && currPos == sequence[currItem].pos {
if r == '\n' {
out += "\n" + sequence[currItem].item
@@ -156,7 +156,7 @@ func softwrapLine(s string, w int) string {
word = ""
wordType = NONE
}
- for _, r := range []rune(newStr) {
+ for _, r := range newStr {
// A WIDE_CHAR itself constitutes a group.
thisType := runeType(r)
if thisType == WIDE_CHAR {