We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 9995bb5 + b98bf88 commit 2d6da83Copy full SHA for 2d6da83
src/libcore/mem.rs
@@ -665,8 +665,8 @@ pub fn swap<T>(x: &mut T, y: &mut T) {
665
/// let mut v: Vec<i32> = vec![1, 2];
666
///
667
/// let old_v = mem::replace(&mut v, vec![3, 4, 5]);
668
-/// assert_eq!(2, old_v.len());
669
-/// assert_eq!(3, v.len());
+/// assert_eq!(vec![1, 2], old_v);
+/// assert_eq!(vec![3, 4, 5], v);
670
/// ```
671
672
/// `replace` allows consumption of a struct field by replacing it with another value.
0 commit comments