From 312a7796105ae33f8f73e77291c0c4d46f6202d5 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 19 Feb 2020 12:44:20 +0100 Subject: Add `remove_mut` assist --- docs/user/assists.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'docs') 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() { } ``` +## `remove_mut` + +Removes the `mut` keyword. + +```rust +// BEFORE +impl Walrus { + fn feed(&mut┃ self, amount: u32) {} +} + +// AFTER +impl Walrus { + fn feed(&self, amount: u32) {} +} +``` + ## `replace_if_let_with_match` Replaces `if let` with an else branch with a `match` expression. -- cgit v1.2.3