summary refs log tree commit diff stats
path: root/lib/pure
diff options
context:
space:
mode:
authorNindaleth <Nindaleth@users.noreply.github.com>2019-10-30 09:08:45 +0100
committerMiran <narimiran@disroot.org>2019-10-30 09:08:45 +0100
commit34dbc5699e8cb36e26bad5a57edc972b82f26c5f (patch)
treede04803327f19ef69b46ca46b4e16a09f77fa6d1 /lib/pure
parent1214960a1bde9b45c76caaff0cdea7d2d753b205 (diff)
downloadNim-34dbc5699e8cb36e26bad5a57edc972b82f26c5f.tar.gz
fix several typos in documentation and comments (#12553)
Diffstat (limited to 'lib/pure')
-rw-r--r--lib/pure/bitops.nim2
-rw-r--r--lib/pure/collections/sequtils.nim2
-rw-r--r--lib/pure/collections/sets.nim2
-rw-r--r--lib/pure/colors.nim4
-rw-r--r--lib/pure/encodings.nim2
-rw-r--r--lib/pure/json.nim2
-rw-r--r--lib/pure/math.nim2
-rw-r--r--lib/pure/os.nim2
8 files changed, 9 insertions, 9 deletions
diff --git a/lib/pure/bitops.nim b/lib/pure/bitops.nim
index 710c8590a..9ebdabb7b 100644
--- a/lib/pure/bitops.nim
+++ b/lib/pure/bitops.nim
@@ -173,7 +173,7 @@ proc fastlog2Nim(x: uint64): int {.inline, noSideEffect.} =
   result = lookup[(v * 0x03F6EAF2CD271461'u64) shr 58].int
 
 # sets.nim cannot import bitops, but bitops can use include
-# system/sets to eleminate code duplication. sets.nim defines defines
+# system/sets to eliminate code duplication. sets.nim defines
 # countBits32 and countBits64.
 include system/sets
 
diff --git a/lib/pure/collections/sequtils.nim b/lib/pure/collections/sequtils.nim
index 0207c2bde..9573753ff 100644
--- a/lib/pure/collections/sequtils.nim
+++ b/lib/pure/collections/sequtils.nim
@@ -1361,7 +1361,7 @@ when isMainModule:
     doAssert foo1(openArray[int]([identity(1), identity(2)])) == @[10, 20]
     doAssert counter == 2
 
-    # Corner cases (openArray litterals should not be common)
+    # Corner cases (openArray literals should not be common)
     template foo2(x: openArray[int]): seq[int] = x.mapIt(it * 10)
     counter = 0
     doAssert foo2(openArray[int]([identity(1), identity(2)])) == @[10, 20]
diff --git a/lib/pure/collections/sets.nim b/lib/pure/collections/sets.nim
index 930b7f0ed..9dd72cb56 100644
--- a/lib/pure/collections/sets.nim
+++ b/lib/pure/collections/sets.nim
@@ -904,7 +904,7 @@ proc `$`*[A](s: OrderedSet[A]): string =
 iterator items*[A](s: OrderedSet[A]): A =
   ## Iterates over keys in the ordered set `s` in insertion order.
   ##
-  ## If you need a sequence with the elelments you can use `sequtils.toSeq
+  ## If you need a sequence with the elements you can use `sequtils.toSeq
   ## template <sequtils.html#toSeq.t,untyped>`_.
   ##
   ## .. code-block::
diff --git a/lib/pure/colors.nim b/lib/pure/colors.nim
index 1332b0738..57ae171dc 100644
--- a/lib/pure/colors.nim
+++ b/lib/pure/colors.nim
@@ -49,7 +49,7 @@ proc satMinus(a, b: int): int {.inline.} =
 proc `+`*(a, b: Color): Color =
   ## Adds two colors.
   ##
-  ## This uses saturated artithmetic, so that each color
+  ## This uses saturated arithmetic, so that each color
   ## component cannot overflow (255 is used as a maximum).
   ##
   runnableExamples:
@@ -63,7 +63,7 @@ proc `+`*(a, b: Color): Color =
 proc `-`*(a, b: Color): Color =
   ## Subtracts two colors.
   ##
-  ## This uses saturated artithmetic, so that each color
+  ## This uses saturated arithmetic, so that each color
   ## component cannot underflow (0 is used as a minimum).
   ##
   runnableExamples:
diff --git a/lib/pure/encodings.nim b/lib/pure/encodings.nim
index 25e779217..e3be1764b 100644
--- a/lib/pure/encodings.nim
+++ b/lib/pure/encodings.nim
@@ -468,7 +468,7 @@ proc convert*(s: string, destEncoding = "UTF-8",
                          srcEncoding = "CP1252"): string =
   ## converts `s` to `destEncoding`. It assumed that `s` is in `srcEncoding`.
   ## This opens a converter, uses it and closes it again and is thus more
-  ## convienent but also likely less efficient than re-using a converter.
+  ## convenient but also likely less efficient than re-using a converter.
   ## utf-16BE, utf-32 conversions not supported on windows
   var c = open(destEncoding, srcEncoding)
   try:
diff --git a/lib/pure/json.nim b/lib/pure/json.nim
index 72002fbab..4e88b6528 100644
--- a/lib/pure/json.nim
+++ b/lib/pure/json.nim
@@ -99,7 +99,7 @@
 ## Unmarshalling
 ## -------------
 ##
-## In addition to reading dynamic data, Nim can also unmarshall JSON directly
+## In addition to reading dynamic data, Nim can also unmarshal JSON directly
 ## into a type with the ``to`` macro.
 ##
 ## .. code-block:: Nim
diff --git a/lib/pure/math.nim b/lib/pure/math.nim
index ee78b6c91..224791e5d 100644
--- a/lib/pure/math.nim
+++ b/lib/pure/math.nim
@@ -43,7 +43,7 @@
 ## * `rationals module<rationals.html>`_ for rational numbers and their
 ##   mathematical operations
 ## * `fenv module<fenv.html>`_ for handling of floating-point rounding
-##   and exceptions (overflow, zero-devide, etc.)
+##   and exceptions (overflow, zero-divide, etc.)
 ## * `random module<random.html>`_ for fast and tiny random number generator
 ## * `mersenne module<mersenne.html>`_ for Mersenne twister random number generator
 ## * `stats module<stats.html>`_ for statistical analysis
diff --git a/lib/pure/os.nim b/lib/pure/os.nim
index b27eee782..a43a9cb32 100644
--- a/lib/pure/os.nim
+++ b/lib/pure/os.nim
@@ -3025,7 +3025,7 @@ proc getFileInfo*(handle: FileHandle): FileInfo {.noNimScript.} =
   when defined(Windows):
     var rawInfo: BY_HANDLE_FILE_INFORMATION
     # We have to use the super special '_get_osfhandle' call (wrapped above)
-    # To transform the C file descripter to a native file handle.
+    # To transform the C file descriptor to a native file handle.
     var realHandle = get_osfhandle(handle)
     if getFileInformationByHandle(realHandle, addr rawInfo) == 0:
       raiseOSError(osLastError())