From dc311b10f3c9b2b16d1d43af98a35dc5f306fc3b Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 27 Mar 2020 13:10:40 +0100 Subject: [PATCH] Fix assist description --- .../src/handlers/replace_let_with_if_let.rs | 12 ++++++++---- docs/user/assists.md | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/crates/ra_assists/src/handlers/replace_let_with_if_let.rs b/crates/ra_assists/src/handlers/replace_let_with_if_let.rs index 10e41f97e37..bdbaae38983 100644 --- a/crates/ra_assists/src/handlers/replace_let_with_if_let.rs +++ b/crates/ra_assists/src/handlers/replace_let_with_if_let.rs @@ -1,6 +1,12 @@ +use std::iter::once; + use hir::Adt; use ra_syntax::{ - ast::{self, make}, + ast::{ + self, + edit::{AstNodeEdit, IndentLevel}, + make, + }, AstNode, T, }; @@ -8,12 +14,10 @@ assist_ctx::{Assist, AssistCtx}, AssistId, }; -use ast::edit::{AstNodeEdit, IndentLevel}; -use std::iter::once; // Assist: replace_let_with_if_let // -// Replaces `if let` with an else branch with a `match` expression. +// Replaces `let` with an `if-let`. // // ``` // # enum Option { Some(T), None } diff --git a/docs/user/assists.md b/docs/user/assists.md index 2495af20ab8..94b5ef85d6d 100644 --- a/docs/user/assists.md +++ b/docs/user/assists.md @@ -585,7 +585,7 @@ fn handle(action: Action) { ## `replace_let_with_if_let` -Replaces `if let` with an else branch with a `match` expression. +Replaces `let` with an `if-let`. ```rust // BEFORE