summary refs log tree commit diff stats
path: root/lib/pure
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2019-07-18 00:36:03 +0200
committerAraq <rumpf_a@web.de>2019-07-18 00:36:03 +0200
commit07d465ca42c98c07dedee0d4834afae5c87702da (patch)
tree2f8b1a315372c295068a1a4f599913f1326fe278 /lib/pure
parentf50e4500c257e3d57654f5230db75042da233d24 (diff)
downloadNim-07d465ca42c98c07dedee0d4834afae5c87702da.tar.gz
[refactoring] remove unused imports in the compiler and in some stdlib modules
Diffstat (limited to 'lib/pure')
-rw-r--r--lib/pure/collections/intsets.nim2
-rw-r--r--lib/pure/concurrency/cpuinfo.nim4
-rw-r--r--lib/pure/hashes.nim4
-rw-r--r--lib/pure/json.nim4
-rw-r--r--lib/pure/os.nim2
-rw-r--r--lib/pure/terminal.nim2
6 files changed, 6 insertions, 12 deletions
diff --git a/lib/pure/collections/intsets.nim b/lib/pure/collections/intsets.nim
index 91b6b55e8..8b7703804 100644
--- a/lib/pure/collections/intsets.nim
+++ b/lib/pure/collections/intsets.nim
@@ -20,7 +20,7 @@
 
 
 import
-  hashes, math
+  hashes
 
 type
   BitScalar = uint
diff --git a/lib/pure/concurrency/cpuinfo.nim b/lib/pure/concurrency/cpuinfo.nim
index 4f681f980..6fc5eb95b 100644
--- a/lib/pure/concurrency/cpuinfo.nim
+++ b/lib/pure/concurrency/cpuinfo.nim
@@ -11,10 +11,8 @@
 
 include "system/inclrtl"
 
-import strutils, os
-
 when not defined(windows):
-  import posix
+  import strutils, posix, os
 
 when defined(linux):
   import linux
diff --git a/lib/pure/hashes.nim b/lib/pure/hashes.nim
index 8104470e3..48e192a59 100644
--- a/lib/pure/hashes.nim
+++ b/lib/pure/hashes.nim
@@ -44,10 +44,6 @@
 ## * `std/sha1 module <sha1.html>`_ for a sha1 encoder and decoder
 ## * `tables module <tables.html>`_ for hash tables
 
-
-import
-  strutils
-
 type
   Hash* = int  ## A hash value. Hash tables using these values should
                ## always have a size of a power of two and can use the ``and``
diff --git a/lib/pure/json.nim b/lib/pure/json.nim
index fa2ddb6f2..1ef08f547 100644
--- a/lib/pure/json.nim
+++ b/lib/pure/json.nim
@@ -142,8 +142,8 @@ runnableExamples:
   doAssert $(%* Foo()) == """{"a1":0,"a2":0,"a0":0,"a3":0,"a4":0}"""
 
 import
-  hashes, tables, strutils, lexbase, streams, unicode, macros, parsejson,
-  typetraits, options
+  hashes, tables, strutils, lexbase, streams, macros, parsejson,
+  options
 
 export
   tables.`$`
diff --git a/lib/pure/os.nim b/lib/pure/os.nim
index ee40a24c7..9ee6a4d4f 100644
--- a/lib/pure/os.nim
+++ b/lib/pure/os.nim
@@ -1849,7 +1849,7 @@ proc expandFilename*(filename: string): string {.rtl, extern: "nos$1",
           break
     # getFullPathName doesn't do case corrections, so we have to use this convoluted
     # way of retrieving the true filename
-    for x in walkFiles(result.string):
+    for x in walkFiles(result):
       result = x
     if not existsFile(result) and not existsDir(result):
       raise newException(OSError, "file '" & result & "' does not exist")
diff --git a/lib/pure/terminal.nim b/lib/pure/terminal.nim
index eb65b6f57..0d386bf18 100644
--- a/lib/pure/terminal.nim
+++ b/lib/pure/terminal.nim
@@ -19,7 +19,7 @@
 import macros
 import strformat
 from strutils import toLowerAscii, `%`
-import colors, tables
+import colors
 
 when defined(windows):
   import winlean