summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorringabout <43030857+ringabout@users.noreply.github.com>2022-10-24 21:20:57 +0800
committerGitHub <noreply@github.com>2022-10-24 15:20:57 +0200
commit878919a4df8b2c82659b60a87f1eb39efb6782e0 (patch)
tree5864b034a1cd83f556ae99ad14585b9ea22318a3
parentd261135c5cdd9fe90f4c6cd21fffded8949ef1c9 (diff)
downloadNim-878919a4df8b2c82659b60a87f1eb39efb6782e0.tar.gz
fixes the typical (not a == b) bug in the documentation (#20643)
* fixes the typical (not a == b) bug; uses runnableExamples

* cannot add runnableExamples
-rw-r--r--lib/pure/colors.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pure/colors.nim b/lib/pure/colors.nim
index 8cda2fab8..b688fad54 100644
--- a/lib/pure/colors.nim
+++ b/lib/pure/colors.nim
@@ -15,7 +15,7 @@ from algorithm import binarySearch
 type
   Color* = distinct int ## A color stored as RGB, e.g. `0xff00cc`.
 
-proc `==` *(a, b: Color): bool {.borrow.}
+proc `==`*(a, b: Color): bool {.borrow.}
   ## Compares two colors.
   ##
   ## .. code-block::
@@ -24,7 +24,7 @@ proc `==` *(a, b: Color): bool {.borrow.}
   ##     b = colFuchsia
   ##     c = Color(0x00_ff_cc)
   ##   assert a == b
-  ##   assert not a == c
+  ##   assert not (a == c)
 
 template extract(a: Color, r, g, b: untyped) =
   var r = a.int shr 16 and 0xff