[refactoring] remove unused imports in the compiler and in some stdlib modules
This commit is contained in:
parent
f50e4500c2
commit
07d465ca42
76 changed files with 531 additions and 558 deletions
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
|
||||
import
|
||||
hashes, math
|
||||
hashes
|
||||
|
||||
type
|
||||
BitScalar = uint
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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``
|
||||
|
|
|
|||
|
|
@ -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.`$`
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
import macros
|
||||
import strformat
|
||||
from strutils import toLowerAscii, `%`
|
||||
import colors, tables
|
||||
import colors
|
||||
|
||||
when defined(windows):
|
||||
import winlean
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue