Skip to content

Commit 75f6ab2

Browse files
bors[bot]matklad
andauthored
Merge #3743
3743: Fix assist description r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
2 parents a4901fd + dc311b1 commit 75f6ab2

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

crates/ra_assists/src/handlers/replace_let_with_if_let.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
1+
use std::iter::once;
2+
13
use hir::Adt;
24
use ra_syntax::{
3-
ast::{self, make},
5+
ast::{
6+
self,
7+
edit::{AstNodeEdit, IndentLevel},
8+
make,
9+
},
410
AstNode, T,
511
};
612

713
use crate::{
814
assist_ctx::{Assist, AssistCtx},
915
AssistId,
1016
};
11-
use ast::edit::{AstNodeEdit, IndentLevel};
12-
use std::iter::once;
1317

1418
// Assist: replace_let_with_if_let
1519
//
16-
// Replaces `if let` with an else branch with a `match` expression.
20+
// Replaces `let` with an `if-let`.
1721
//
1822
// ```
1923
// # enum Option<T> { Some(T), None }

docs/user/assists.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@ fn handle(action: Action) {
585585

586586
## `replace_let_with_if_let`
587587

588-
Replaces `if let` with an else branch with a `match` expression.
588+
Replaces `let` with an `if-let`.
589589

590590
```rust
591591
// BEFORE

0 commit comments

Comments
 (0)