about summary refs log tree commit diff
path: root/src/doc/tutorial.md
diff options
context:
space:
mode:
Diffstat (limited to 'src/doc/tutorial.md')
-rw-r--r--src/doc/tutorial.md4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/doc/tutorial.md b/src/doc/tutorial.md
index d0463ca17d3..a0a012ef69b 100644
--- a/src/doc/tutorial.md
+++ b/src/doc/tutorial.md
@@ -1579,6 +1579,8 @@ allocated memory on the heap. A unique vector owns the elements it contains, so
 the elements are mutable if the vector is mutable.
 
 ~~~
+use std::strbuf::StrBuf;
+
 // A dynamically sized vector (unique vector)
 let mut numbers = ~[1, 2, 3];
 numbers.push(4);
@@ -1589,7 +1591,7 @@ let more_numbers: ~[int] = numbers;
 
 // The original `numbers` value can no longer be used, due to move semantics.
 
-let mut string = ~"fo";
+let mut string = StrBuf::from_str("fo");
 string.push_char('o');
 ~~~