summary refs log tree commit diff stats
path: root/doc/manual/trmacros.txt
diff options
context:
space:
mode:
authorreactormonk <hafnersimon@gmail.com>2015-05-24 21:08:12 -0500
committerreactormonk <hafnersimon@gmail.com>2015-05-24 21:08:12 -0500
commitd8921a44859646d67f38f9bbb039b48e7285790e (patch)
tree7b1963cb6e327e9cc4c84e0be4695d67755dcd85 /doc/manual/trmacros.txt
parent31d0f79d9d149798b114bc6703ec381143f49c60 (diff)
downloadNim-d8921a44859646d67f38f9bbb039b48e7285790e.tar.gz
Revert "Fix typo in manual"
Diffstat (limited to 'doc/manual/trmacros.txt')
-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 53c604f7b..90d01e475 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 = key
-    t[idx].val = val
+    t[idx] = key
+    t[idx] = 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, key
-    shallowCopy t[idx].val, val
+    shallowCopy t[idx], key
+    shallowCopy t[idx], val
 
   var t: Table
   # overloading resolution ensures that the optimized []= is called here: