about summary refs log tree commit diff
path: root/src/doc/guide-testing.md
diff options
context:
space:
mode:
authorDaniel Micay <danielmicay@gmail.com>2014-03-08 18:11:52 -0500
committerDaniel Micay <danielmicay@gmail.com>2014-03-20 01:30:27 -0400
commitce620320a20baa1428e679c751b1b4a8d8556ca1 (patch)
treef28a0234fe5f1d9509ef6cfa0c92448f7f29f7ec /src/doc/guide-testing.md
parent4ca51aeea7187a63b987129d67cf7d348b6c60a9 (diff)
downloadrust-ce620320a20baa1428e679c751b1b4a8d8556ca1.tar.gz
rust-ce620320a20baa1428e679c751b1b4a8d8556ca1.zip
rename std::vec -> std::slice
Closes #12702
Diffstat (limited to 'src/doc/guide-testing.md')
-rw-r--r--src/doc/guide-testing.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/doc/guide-testing.md b/src/doc/guide-testing.md
index 1a01fad5da2..3efed4a215b 100644
--- a/src/doc/guide-testing.md
+++ b/src/doc/guide-testing.md
@@ -188,18 +188,18 @@ For example:
 # #[allow(unused_imports)];
 extern crate test;
 
-use std::vec;
+use std::slice;
 use test::BenchHarness;
 
 #[bench]
 fn bench_sum_1024_ints(b: &mut BenchHarness) {
-    let v = vec::from_fn(1024, |n| n);
+    let v = slice::from_fn(1024, |n| n);
     b.iter(|| {v.iter().fold(0, |old, new| old + *new);} );
 }
 
 #[bench]
 fn initialise_a_vector(b: &mut BenchHarness) {
-    b.iter(|| {vec::from_elem(1024, 0u64);} );
+    b.iter(|| {slice::from_elem(1024, 0u64);} );
     b.bytes = 1024 * 8;
 }