]> git.lizzy.rs Git - rust.git/blobdiff - crates/ra_assists/src/handlers/unwrap_block.rs
Add unwrap block assist #4156
[rust.git] / crates / ra_assists / src / handlers / unwrap_block.rs
index b98601f1c0815ea4b7ad7cedd579d023014e05fb..35d87bc9e77ef600a3b80d9e99509c198095a9f8 100644 (file)
@@ -6,7 +6,7 @@
 
 // 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() {
@@ -18,7 +18,7 @@
 // ->
 // ```
 // fn foo() {
-//     <|>println!("foo");
+//     println!("foo");
 // }
 // ```
 pub(crate) fn unwrap_block(ctx: AssistCtx) -> Option<Assist> {