diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-02-19 11:49:52 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-02-19 11:49:52 +0000 |
commit | 624a9978e25c7c6cee7fd88afd1559f1f143fe4e (patch) | |
tree | 56160520062feb9d9b55e49051060bd3b2248ec7 /docs/user | |
parent | eb804261dce7f13056566377148a41f460feed28 (diff) | |
parent | 312a7796105ae33f8f73e77291c0c4d46f6202d5 (diff) |
Merge #3231
3231: Add `remove_mut` assist r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'docs/user')
-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. |