aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorBenjamin Coenen <[email protected]>2020-04-29 12:52:55 +0100
committerBenjamin Coenen <[email protected]>2020-04-29 13:08:30 +0100
commit76733f0cd456005295e60da8c45d74c8c48f177c (patch)
treec5fb8ad0429bb9ad4c749612225f776844b4d127 /docs
parentc3c7edb9bc3f2860686383dc1498c988a56859e8 (diff)
Add unwrap block assist #4156
Signed-off-by: Benjamin Coenen <[email protected]>
Diffstat (limited to 'docs')
-rw-r--r--docs/user/assists.md18
1 files changed, 18 insertions, 0 deletions
diff --git a/docs/user/assists.md b/docs/user/assists.md
index 6c6943622..02323772c 100644
--- a/docs/user/assists.md
+++ b/docs/user/assists.md
@@ -695,3 +695,21 @@ use std::┃collections::HashMap;
695// AFTER 695// AFTER
696use std::{collections::HashMap}; 696use std::{collections::HashMap};
697``` 697```
698
699## `unwrap_block`
700
701Removes the `mut` keyword.
702
703```rust
704// BEFORE
705fn foo() {
706 if true {┃
707 println!("foo");
708 }
709}
710
711// AFTER
712fn foo() {
713 ┃println!("foo");
714}
715```