Add unwrap block assist #4156

Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
This commit is contained in:
Benjamin Coenen 2020-04-29 13:52:55 +02:00
parent c3c7edb9bc
commit 76733f0cd4
5 changed files with 475 additions and 1 deletions

View file

@ -695,3 +695,21 @@ use std::┃collections::HashMap;
// AFTER
use std::{collections::HashMap};
```
## `unwrap_block`
Removes the `mut` keyword.
```rust
// BEFORE
fn foo() {
if true {┃
println!("foo");
}
}
// AFTER
fn foo() {
┃println!("foo");
}
```