diff options
author | Aleksey Kladov <[email protected]> | 2020-02-19 11:44:20 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-02-19 11:44:54 +0000 |
commit | 312a7796105ae33f8f73e77291c0c4d46f6202d5 (patch) | |
tree | ba0dd37991220be14187f03b066c6490776eb6df /docs | |
parent | d07f043ef1c99491cb172f3c3474b31c97501d7a (diff) |
Add `remove_mut` assist
Diffstat (limited to 'docs')
-rw-r--r-- | docs/user/assists.md | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/docs/user/assists.md b/docs/user/assists.md index f737a2fa4..9861332af 100644 --- a/docs/user/assists.md +++ b/docs/user/assists.md | |||
@@ -527,6 +527,22 @@ fn main() { | |||
527 | } | 527 | } |
528 | ``` | 528 | ``` |
529 | 529 | ||
530 | ## `remove_mut` | ||
531 | |||
532 | Removes the `mut` keyword. | ||
533 | |||
534 | ```rust | ||
535 | // BEFORE | ||
536 | impl Walrus { | ||
537 | fn feed(&mut┃ self, amount: u32) {} | ||
538 | } | ||
539 | |||
540 | // AFTER | ||
541 | impl Walrus { | ||
542 | fn feed(&self, amount: u32) {} | ||
543 | } | ||
544 | ``` | ||
545 | |||
530 | ## `replace_if_let_with_match` | 546 | ## `replace_if_let_with_match` |
531 | 547 | ||
532 | Replaces `if let` with an else branch with a `match` expression. | 548 | Replaces `if let` with an else branch with a `match` expression. |