Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
"#####,
r#####"
fn foo() {
- <|>println!("foo");
+ println!("foo");
}
"#####,
)
// Assist: unwrap_block
//
-// Removes the `mut` keyword.
+// This assist removes if...else, for, while and loop control statements to just keep the body.
//
// ```
// fn foo() {
// ->
// ```
// fn foo() {
-// <|>println!("foo");
+// println!("foo");
// }
// ```
pub(crate) fn unwrap_block(ctx: AssistCtx) -> Option<Assist> {
## `unwrap_block`
-Removes the `mut` keyword.
+This assist removes if...else, for, while and loop control statements to just keep the body.
```rust
// BEFORE
// AFTER
fn foo() {
- ┃println!("foo");
+ println!("foo");
}
```