aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-02-19 11:44:20 +0000
committerAleksey Kladov <[email protected]>2020-02-19 11:44:54 +0000
commit312a7796105ae33f8f73e77291c0c4d46f6202d5 (patch)
treeba0dd37991220be14187f03b066c6490776eb6df /docs
parentd07f043ef1c99491cb172f3c3474b31c97501d7a (diff)
Add `remove_mut` assist
Diffstat (limited to 'docs')
-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.