summary refs log tree commit diff stats
path: root/lib/pure
diff options
context:
space:
mode:
authorJacek Sieka <arnetheduck@gmail.com>2015-04-03 23:30:42 +0800
committerJacek Sieka <arnetheduck@gmail.com>2015-04-03 23:30:42 +0800
commit0f131b9f46aed4bd077c2c04e63dc0cacc348930 (patch)
tree231a46b211b267403eaf26c788e52c0b23dc54f6 /lib/pure
parentd7a42641ab66c3f785f179fe86846c3c92cb9739 (diff)
downloadNim-0f131b9f46aed4bd077c2c04e63dc0cacc348930.tar.gz
ropes: remove more unnecessary checks
Diffstat (limited to 'lib/pure')
-rw-r--r--lib/pure/ropes.nim6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/pure/ropes.nim b/lib/pure/ropes.nim
index af5c50521..3959b930f 100644
--- a/lib/pure/ropes.nim
+++ b/lib/pure/ropes.nim
@@ -315,15 +315,15 @@ proc `%`*(frmt: string, args: openArray[Rope]): Rope {.
         while true:
           j = j * 10 + ord(frmt[i]) - ord('0')
           inc(i)
-          if (i >= length) or frmt[i] notin {'0'..'9'}: break
+          if frmt[i] notin {'0'..'9'}: break
         add(result, args[j-1])
       of '{':
         inc(i)
         var j = 0
-        while i < length and frmt[i] in {'0'..'9'}:
+        while frmt[i] in {'0'..'9'}:
           j = j * 10 + ord(frmt[i]) - ord('0')
           inc(i)
-        if i < length and frmt[i] == '}': inc(i)
+        if frmt[i] == '}': inc(i)
         else: raise newException(ValueError, "invalid format string")
 
         add(result, args[j-1])