about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSantiago Pastorino <spastorino@gmail.com>2019-05-07 13:31:12 -0300
committerSantiago Pastorino <spastorino@gmail.com>2019-05-07 13:31:12 -0300
commitb98bf88d3244cc5518b6ad9302f179c1e6d11a9e (patch)
treeca044ab4204a08139e2429438996072d71a43434
parent775486589279430b4c9ebe7c1aac6017563c853a (diff)
downloadrust-b98bf88d3244cc5518b6ad9302f179c1e6d11a9e.tar.gz
rust-b98bf88d3244cc5518b6ad9302f179c1e6d11a9e.zip
Be a bit more explicit asserting over the vec rather than the len
-rw-r--r--src/libcore/mem.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcore/mem.rs b/src/libcore/mem.rs
index 95480c6bf04..ae43a7f5ffa 100644
--- a/src/libcore/mem.rs
+++ b/src/libcore/mem.rs
@@ -666,8 +666,8 @@ pub fn swap<T>(x: &mut T, y: &mut T) {
 /// let mut v: Vec<i32> = vec![1, 2];
 ///
 /// let old_v = mem::replace(&mut v, vec![3, 4, 5]);
-/// assert_eq!(2, old_v.len());
-/// assert_eq!(3, v.len());
+/// assert_eq!(vec![1, 2], old_v);
+/// assert_eq!(vec![3, 4, 5], v);
 /// ```
 ///
 /// `replace` allows consumption of a struct field by replacing it with another value.