summary refs log tree commit diff stats
path: root/doc
diff options
context:
space:
mode:
authorFlaviu Tamas <tamasflaviu@gmail.com>2015-05-24 22:06:12 -0400
committerFlaviu Tamas <tamasflaviu@gmail.com>2015-05-24 22:06:12 -0400
commitbdb55c5d1d85f9425004f53f7e2cac5d31c90023 (patch)
tree3fbcb5486992e1dd6b38fff4c7b0c5c456ef9b03 /doc
parent5ad9d874c32a72ab473d3455b5d72f915729d195 (diff)
downloadNim-bdb55c5d1d85f9425004f53f7e2cac5d31c90023.tar.gz
Fix typo in manual
See IRC logs around Sun May 24 22:06:26 EDT 2015 for details
Diffstat (limited to 'doc')
-rw-r--r--doc/manual/trmacros.txt8
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/manual/trmacros.txt b/doc/manual/trmacros.txt
index 90d01e475..53c604f7b 100644
--- a/doc/manual/trmacros.txt
+++ b/doc/manual/trmacros.txt
@@ -345,15 +345,15 @@ optimization for types that have copying semantics:
     ## puts a (key, value)-pair into `t`. The semantics of string require
     ## a copy here:
     let idx = findInsertionPosition(key)
-    t[idx] = key
-    t[idx] = val
+    t[idx].key = key
+    t[idx].val = val
 
   proc `[]=`*(t: var Table, key: string{call}, val: string{call}) =
     ## puts a (key, value)-pair into `t`. Optimized version that knows that
     ## the strings are unique and thus don't need to be copied:
     let idx = findInsertionPosition(key)
-    shallowCopy t[idx], key
-    shallowCopy t[idx], val
+    shallowCopy t[idx].key, key
+    shallowCopy t[idx].val, val
 
   var t: Table
   # overloading resolution ensures that the optimized []= is called here: