about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2015-02-24 21:15:45 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2015-02-24 21:15:45 +0300
commit2807a1ce0255ce98415ebe6f65eb589d0f2f894b (patch)
tree879116c1d285754e3e3779817211b816849902b7 /src/libcore
parentdccdde4007c191aa8b8d9cfffb0c7d3509fa675e (diff)
downloadrust-2807a1ce0255ce98415ebe6f65eb589d0f2f894b.tar.gz
rust-2807a1ce0255ce98415ebe6f65eb589d0f2f894b.zip
Use arrays instead of vectors in tests
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/iter.rs4
-rw-r--r--src/libcore/option.rs2
-rw-r--r--src/libcore/result.rs4
3 files changed, 5 insertions, 5 deletions
diff --git a/src/libcore/iter.rs b/src/libcore/iter.rs
index 09089f2d04c..6d8e04d97dd 100644
--- a/src/libcore/iter.rs
+++ b/src/libcore/iter.rs
@@ -582,8 +582,8 @@ pub trait IteratorExt: Iterator + Sized {
     /// ```
     /// let vec = vec![1, 2, 3, 4];
     /// let (even, odd): (Vec<_>, Vec<_>) = vec.into_iter().partition(|&n| n % 2 == 0);
-    /// assert_eq!(even, vec![2, 4]);
-    /// assert_eq!(odd, vec![1, 3]);
+    /// assert_eq!(even, [2, 4]);
+    /// assert_eq!(odd, [1, 3]);
     /// ```
     #[unstable(feature = "core",
                reason = "recently added as part of collections reform")]
diff --git a/src/libcore/option.rs b/src/libcore/option.rs
index abfef72a5db..1ecbd8fae8c 100644
--- a/src/libcore/option.rs
+++ b/src/libcore/option.rs
@@ -556,7 +556,7 @@ impl<T> Option<T> {
     /// ```
     /// let x = Some("string");
     /// let v: Vec<&str> = x.into_iter().collect();
-    /// assert_eq!(v, vec!["string"]);
+    /// assert_eq!(v, ["string"]);
     ///
     /// let x = None;
     /// let v: Vec<&str> = x.into_iter().collect();
diff --git a/src/libcore/result.rs b/src/libcore/result.rs
index 23e936a75d7..bca73782491 100644
--- a/src/libcore/result.rs
+++ b/src/libcore/result.rs
@@ -548,11 +548,11 @@ impl<T, E> Result<T, E> {
     /// ```
     /// let x: Result<u32, &str> = Ok(5);
     /// let v: Vec<u32> = x.into_iter().collect();
-    /// assert_eq!(v, vec![5]);
+    /// assert_eq!(v, [5]);
     ///
     /// let x: Result<u32, &str> = Err("nothing!");
     /// let v: Vec<u32> = x.into_iter().collect();
-    /// assert_eq!(v, vec![]);
+    /// assert_eq!(v, []);
     /// ```
     #[inline]
     #[stable(feature = "rust1", since = "1.0.0")]