aboutsummaryrefslogtreecommitdiff
path: root/docs/user
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-02-19 11:49:52 +0000
committerGitHub <[email protected]>2020-02-19 11:49:52 +0000
commit624a9978e25c7c6cee7fd88afd1559f1f143fe4e (patch)
tree56160520062feb9d9b55e49051060bd3b2248ec7 /docs/user
parenteb804261dce7f13056566377148a41f460feed28 (diff)
parent312a7796105ae33f8f73e77291c0c4d46f6202d5 (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.md16
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
532Removes the `mut` keyword.
533
534```rust
535// BEFORE
536impl Walrus {
537 fn feed(&mut┃ self, amount: u32) {}
538}
539
540// AFTER
541impl Walrus {
542 fn feed(&self, amount: u32) {}
543}
544```
545
530## `replace_if_let_with_match` 546## `replace_if_let_with_match`
531 547
532Replaces `if let` with an else branch with a `match` expression. 548Replaces `if let` with an else branch with a `match` expression.