Skip to content

Commit b98bf88

Browse files
committed
Be a bit more explicit asserting over the vec rather than the len
1 parent 7754865 commit b98bf88

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libcore/mem.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -666,8 +666,8 @@ pub fn swap<T>(x: &mut T, y: &mut T) {
666666
/// let mut v: Vec<i32> = vec![1, 2];
667667
///
668668
/// let old_v = mem::replace(&mut v, vec![3, 4, 5]);
669-
/// assert_eq!(2, old_v.len());
670-
/// assert_eq!(3, v.len());
669+
/// assert_eq!(vec![1, 2], old_v);
670+
/// assert_eq!(vec![3, 4, 5], v);
671671
/// ```
672672
///
673673
/// `replace` allows consumption of a struct field by replacing it with another value.

0 commit comments

Comments
 (0)