allow random module to be used in standalone: (#12617)
proc randomized*() uses time releated function which is not available on standalone, so disable this function for standalone.
This commit is contained in:
parent
e1b1759439
commit
8b1ef8e07e
1 changed files with 1 additions and 1 deletions
|
|
@ -625,7 +625,7 @@ proc shuffle*[T](x: var openArray[T]) =
|
|||
doAssert cards == ["King", "Ace", "Queen", "Ten", "Jack"]
|
||||
shuffle(state, x)
|
||||
|
||||
when not defined(nimscript):
|
||||
when not defined(nimscript) and not defined(standalone):
|
||||
import times
|
||||
|
||||
proc randomize*() {.benign.} =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue