mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
Add unwrap block assist #4156
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
This commit is contained in:
parent
c3c7edb9bc
commit
76733f0cd4
5 changed files with 475 additions and 1 deletions
|
@ -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");
|
||||
}
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue