Skip to content

Commit 6692f41

Browse files
author
Jonathan Turner
authored
Rollup merge of #35562 - birkenfeld:as-mut-doc, r=steveklabnik
Remove redundant `&mut ref mut` in doc for Result::as_mut() While a good example of how `&mut ref mut` is a no-op, I don't think we should show that here :) See https://users.rust-lang.org/t/mnemonic-for-reading-qualifiers/6853 r? @steveklabnik
2 parents aaed538 + 70e760f commit 6692f41

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libcore/result.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,8 +402,8 @@ impl<T, E> Result<T, E> {
402402
/// ```
403403
/// fn mutate(r: &mut Result<i32, i32>) {
404404
/// match r.as_mut() {
405-
/// Ok(&mut ref mut v) => *v = 42,
406-
/// Err(&mut ref mut e) => *e = 0,
405+
/// Ok(v) => *v = 42,
406+
/// Err(e) => *e = 0,
407407
/// }
408408
/// }
409409
///

0 commit comments

Comments
 (0)