summary refs log tree commit diff stats
path: root/lib/std/private
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2023-02-24 09:02:15 +0100
committerGitHub <noreply@github.com>2023-02-24 09:02:15 +0100
commit8a19ac20708c66fb3541533d55b60624cee56ab7 (patch)
tree0ddf7c34c2ecd76f8d1e1660de346c45e1bab145 /lib/std/private
parent7dc80a7fefb0d2cecbdc2696c71ea2fa94d6aa76 (diff)
downloadNim-8a19ac20708c66fb3541533d55b60624cee56ab7.tar.gz
fixes #21393 and misc style changes (#21419)
* fixes #21393 and misc style changes

* progress

---------

Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
Diffstat (limited to 'lib/std/private')
-rw-r--r--lib/std/private/digitsutils.nim4
-rw-r--r--lib/std/private/ospaths2.nim2
2 files changed, 2 insertions, 4 deletions
diff --git a/lib/std/private/digitsutils.nim b/lib/std/private/digitsutils.nim
index b3dc5d14f..e051e5218 100644
--- a/lib/std/private/digitsutils.nim
+++ b/lib/std/private/digitsutils.nim
@@ -101,9 +101,7 @@ proc addInt*(result: var string; x: int64) {.enforceNoRaises.} =
         num = cast[uint64](x)
       else:
         num = uint64(-x)
-      let base = result.len
-      setLen(result, base + 1)
-      result[base] = '-'
+      result.add '-'
     else:
       num = uint64(x)
     addInt(result, num)
diff --git a/lib/std/private/ospaths2.nim b/lib/std/private/ospaths2.nim
index 5e3bece68..78a806675 100644
--- a/lib/std/private/ospaths2.nim
+++ b/lib/std/private/ospaths2.nim
@@ -571,7 +571,7 @@ proc normExt(ext: string): string =
 
 proc searchExtPos*(path: string): int =
   ## Returns index of the `'.'` char in `path` if it signifies the beginning
-  ## of extension. Returns -1 otherwise.
+  ## of the file extension. Returns -1 otherwise.
   ##
   ## See also:
   ## * `splitFile proc`_