diff options
author | Benjamin Coenen <[email protected]> | 2020-04-29 12:52:55 +0100 |
---|---|---|
committer | Benjamin Coenen <[email protected]> | 2020-04-29 13:08:30 +0100 |
commit | 76733f0cd456005295e60da8c45d74c8c48f177c (patch) | |
tree | c5fb8ad0429bb9ad4c749612225f776844b4d127 /docs | |
parent | c3c7edb9bc3f2860686383dc1498c988a56859e8 (diff) |
Add unwrap block assist #4156
Signed-off-by: Benjamin Coenen <[email protected]>
Diffstat (limited to 'docs')
-rw-r--r-- | docs/user/assists.md | 18 |
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 |
696 | use std::{collections::HashMap}; | 696 | use std::{collections::HashMap}; |
697 | ``` | 697 | ``` |
698 | |||
699 | ## `unwrap_block` | ||
700 | |||
701 | Removes the `mut` keyword. | ||
702 | |||
703 | ```rust | ||
704 | // BEFORE | ||
705 | fn foo() { | ||
706 | if true {┃ | ||
707 | println!("foo"); | ||
708 | } | ||
709 | } | ||
710 | |||
711 | // AFTER | ||
712 | fn foo() { | ||
713 | ┃println!("foo"); | ||
714 | } | ||
715 | ``` | ||