about summary refs log tree commit diff
path: root/doc/rust.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/rust.md')
-rw-r--r--doc/rust.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/rust.md b/doc/rust.md
index ccc5a532cdd..6f6a7bb86b6 100644
--- a/doc/rust.md
+++ b/doc/rust.md
@@ -1016,7 +1016,7 @@ fn iter<T>(seq: ~[T], f: fn(T)) {
 }
 fn map<T, U>(seq: ~[T], f: fn(T) -> U) -> ~[U] {
     let mut acc = ~[];
-    for seq.each |elt| { vec::push(acc, f(elt)); }
+    for seq.each |elt| { acc.push(f(elt)); }
     acc
 }
 ~~~~