diff options
author | Özgür Kesim <oec@codeblau.de> | 2024-12-08 22:51:59 +0100 |
---|---|---|
committer | Özgür Kesim <oec@codeblau.de> | 2024-12-08 22:51:59 +0100 |
commit | fc558d99f29c5333dd0b26428e48ec2b61d640ec (patch) | |
tree | 76f78a737d8294c3e7fdec8ce7c1384c88cc2c82 /uncrust.go | |
parent | fc42dd0fcc03d5cf83004538f03f6f9cc89a88ae (diff) |
simplify loop
Diffstat (limited to 'uncrust.go')
-rw-r--r-- | uncrust.go | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -70,11 +70,8 @@ func main() { // We have to calculate the rune position from the byte position. rcount := 0 idx := 0 - cont := false for p := range before { - cont = false for i := range edits[idx:] { - cont = true if edits[i].Start == p { edits[i].Start = rcount } @@ -84,7 +81,7 @@ func main() { } } rcount++ - if !cont { + if idx == len(edits) { break } } |