mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-04 20:17:42 +00:00
remove outdated codes (#17140)
* remove unnecessary when statement * remove outdated codes
This commit is contained in:
@@ -326,7 +326,6 @@ func distribute*[T](s: seq[T], num: Positive, spread = true): seq[seq[T]] =
|
||||
if num < 2:
|
||||
result = @[s]
|
||||
return
|
||||
let num = int(num) # XXX probably only needed because of .. bug
|
||||
|
||||
# Create the result and calculate the stride size and the remainder if any.
|
||||
result = newSeq[seq[T]](num)
|
||||
|
||||
@@ -300,7 +300,6 @@ proc raiseFormatException(s: string) =
|
||||
|
||||
proc getValue(t: StringTableRef, flags: set[FormatFlag], key: string): string =
|
||||
if hasKey(t, key): return t.getOrDefault(key)
|
||||
# hm difficult: assume safety in taint mode here. XXX This is dangerous!
|
||||
when defined(js) or defined(nimscript) or defined(Standalone):
|
||||
result = ""
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user