summary refs log tree commit diff stats
path: root/doc
diff options
context:
space:
mode:
authorDanil Yarantsev <tiberiumk12@gmail.com>2021-03-01 00:17:19 +0300
committerGitHub <noreply@github.com>2021-02-28 13:17:19 -0800
commit56461c280f78c55f538da7f382e1c2c308e04915 (patch)
treef98e1d9a440725e4bdf3f44a1694aec958299ff6 /doc
parent26a6ceb34eb2bfca4e39dec2dac2d0a2cdc1bade (diff)
downloadNim-56461c280f78c55f538da7f382e1c2c308e04915.tar.gz
Change stdlib imports to use std prefix in most examples (#17202)
Diffstat (limited to 'doc')
-rw-r--r--doc/hcr.rst2
-rw-r--r--doc/manual.rst6
-rw-r--r--doc/spawn.txt4
3 files changed, 6 insertions, 6 deletions
diff --git a/doc/hcr.rst b/doc/hcr.rst
index d2e13e1c7..6dc65b1cd 100644
--- a/doc/hcr.rst
+++ b/doc/hcr.rst
@@ -29,7 +29,7 @@ To install SDL2 you can use ``nimble install sdl2``.
   import sdl2
 
   #*** import the hotcodereloading stdlib module ***
-  import hotcodereloading
+  import std/hotcodereloading
 
   var runGame*: bool = true
   var window: WindowPtr
diff --git a/doc/manual.rst b/doc/manual.rst
index 92235821b..4884db0e1 100644
--- a/doc/manual.rst
+++ b/doc/manual.rst
@@ -5941,7 +5941,7 @@ imported:
     :test: "nim c $1"
     :status: 1
 
-  import strutils except `%`, toUpperAscii
+  import std/strutils except `%`, toUpperAscii
 
   # doesn't work then:
   echo "$1" % "abc".toUpperAscii
@@ -5984,7 +5984,7 @@ Module names in imports
 A module alias can be introduced via the ``as`` keyword:
 
 .. code-block:: nim
-  import strutils as su, sequtils as qu
+  import std/strutils as su, std/sequtils as qu
 
   echo su.format("$1", "lalelu")
 
@@ -6048,7 +6048,7 @@ full qualification:
 .. code-block:: nim
     :test: "nim c $1"
 
-  from strutils import `%`
+  from std/strutils import `%`
 
   echo "$1" % "abc"
   # always possible: full qualification:
diff --git a/doc/spawn.txt b/doc/spawn.txt
index ab667ff48..c437e8aa3 100644
--- a/doc/spawn.txt
+++ b/doc/spawn.txt
@@ -29,7 +29,7 @@ the passed expression on the thread pool and returns a `data flow variable`:idx:
 variables at the same time:
 
 .. code-block:: nim
-  import threadpool, ...
+  import std/threadpool, ...
 
   # wait until 2 out of 3 servers received the update:
   proc main =
@@ -56,7 +56,7 @@ Example:
 
 .. code-block:: nim
   # Compute PI in an inefficient way
-  import strutils, math, threadpool
+  import std/[strutils, math, threadpool]
 
   proc term(k: float): float = 4 * math.pow(-1, k) / (2*k + 1)