File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed
crates/ra_assists/src/handlers Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change
1
+ use std:: iter:: once;
2
+
1
3
use hir:: Adt ;
2
4
use ra_syntax:: {
3
- ast:: { self , make} ,
5
+ ast:: {
6
+ self ,
7
+ edit:: { AstNodeEdit , IndentLevel } ,
8
+ make,
9
+ } ,
4
10
AstNode , T ,
5
11
} ;
6
12
7
13
use crate :: {
8
14
assist_ctx:: { Assist , AssistCtx } ,
9
15
AssistId ,
10
16
} ;
11
- use ast:: edit:: { AstNodeEdit , IndentLevel } ;
12
- use std:: iter:: once;
13
17
14
18
// Assist: replace_let_with_if_let
15
19
//
16
- // Replaces `if let` with an else branch with a `match` expression .
20
+ // Replaces `let` with an `if-let` .
17
21
//
18
22
// ```
19
23
// # enum Option<T> { Some(T), None }
Original file line number Diff line number Diff line change @@ -585,7 +585,7 @@ fn handle(action: Action) {
585
585
586
586
## ` replace_let_with_if_let `
587
587
588
- Replaces ` if let` with an else branch with a ` match ` expression .
588
+ Replaces ` let ` with an ` if-let ` .
589
589
590
590
``` rust
591
591
// BEFORE
You can’t perform that action at this time.
0 commit comments