Be a bit more explicit asserting over the vec rather than the len
This commit is contained in:
parent
7754865892
commit
b98bf88d32
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user