Change stdlib imports to use std prefix in most examples (#17202)
This commit is contained in:
parent
26a6ceb34e
commit
56461c280f
45 changed files with 127 additions and 127 deletions
|
|
@ -30,7 +30,7 @@
|
|||
## # Be sure to compile with --threads:on.
|
||||
## # The channels and threads modules are part of system and should not be
|
||||
## # imported.
|
||||
## import os
|
||||
## import std/os
|
||||
##
|
||||
## # Channels can either be:
|
||||
## # - declared at the module level, or
|
||||
|
|
|
|||
|
|
@ -913,7 +913,7 @@ iterator lines*(filename: string): string {.tags: [ReadIOEffect].} =
|
|||
## character(s) are removed from the iterated lines. Example:
|
||||
##
|
||||
## .. code-block:: nim
|
||||
## import strutils
|
||||
## import std/strutils
|
||||
##
|
||||
## proc transformLetters(filename: string) =
|
||||
## var buffer = ""
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ iterator countdown*[T](a, b: T, step: Positive = 1): T {.inline.} =
|
|||
## **Note**: This fails to count to `low(int)` if T = int for
|
||||
## efficiency reasons.
|
||||
runnableExamples:
|
||||
import sugar
|
||||
import std/sugar
|
||||
let x = collect(newSeq):
|
||||
for i in countdown(7, 3):
|
||||
i
|
||||
|
|
@ -49,7 +49,7 @@ iterator countup*[T](a, b: T, step: Positive = 1): T {.inline.} =
|
|||
## **Note**: This fails to count to `high(int)` if T = int for
|
||||
## efficiency reasons.
|
||||
runnableExamples:
|
||||
import sugar
|
||||
import std/sugar
|
||||
let x = collect(newSeq):
|
||||
for i in countup(3, 7):
|
||||
i
|
||||
|
|
@ -78,7 +78,7 @@ iterator `..`*[T](a, b: T): T {.inline.} =
|
|||
## See also:
|
||||
## * [..<](#..<.i,T,T)
|
||||
runnableExamples:
|
||||
import sugar
|
||||
import std/sugar
|
||||
|
||||
let x = collect(newSeq):
|
||||
for i in 3 .. 7:
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
##
|
||||
## .. code-block:: Nim
|
||||
##
|
||||
## import locks
|
||||
## import std/locks
|
||||
##
|
||||
## var
|
||||
## thr: array[0..4, Thread[tuple[a,b: int]]]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue