summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorTimothee Cour <timothee.cour2@gmail.com>2021-06-22 21:42:39 -0700
committerGitHub <noreply@github.com>2021-06-22 21:42:39 -0700
commit5badeea17055c85ea8177baeee62c8d1d06ac13e (patch)
tree668b0c02067ca641f185c189d0d5cdffc0c677e5 /lib
parent9a81e91fa5d01cd6d60a408d0888dce4a9f49898 (diff)
downloadNim-5badeea17055c85ea8177baeee62c8d1d06ac13e.tar.gz
followup #18318: simplify `dollarImpl` and add a test (#18330)
Diffstat (limited to 'lib')
-rw-r--r--lib/system/dollars.nim7
1 files changed, 0 insertions, 7 deletions
diff --git a/lib/system/dollars.nim b/lib/system/dollars.nim
index 75390b0e1..3d824a965 100644
--- a/lib/system/dollars.nim
+++ b/lib/system/dollars.nim
@@ -7,15 +7,8 @@ proc `$`*(x: int): string {.magic: "IntToStr", noSideEffect.}
   ## spelling `toString`:idx:.
 
 template dollarImpl(x: uint | uint64, result: var string) =
-  type destTyp = typeof(x)
-  if x == 0:
-    return "0"
-  elif x == 1:
-    return "1"
-
   let length = digits10(x)
   setLen(result, length)
-
   numToString(result, x, length)
 
 when defined(js):