parent
1fe126af2e
commit
804f024eda
@ -541,7 +541,7 @@ impl<T> Option<T> {
|
||||
/// ```
|
||||
/// let mut x = Some(4);
|
||||
/// match x.iter_mut().next() {
|
||||
/// Some(&mut ref mut v) => *v = 42,
|
||||
/// Some(v) => *v = 42,
|
||||
/// None => {},
|
||||
/// }
|
||||
/// assert_eq!(x, Some(42));
|
||||
|
@ -538,7 +538,7 @@ impl<T, E> Result<T, E> {
|
||||
/// ```
|
||||
/// let mut x: Result<u32, &str> = Ok(7);
|
||||
/// match x.iter_mut().next() {
|
||||
/// Some(&mut ref mut x) => *x = 40,
|
||||
/// Some(v) => *v = 40,
|
||||
/// None => {},
|
||||
/// }
|
||||
/// assert_eq!(x, Ok(40));
|
||||
|
Loading…
Reference in New Issue
Block a user