diff options
author | Aleksey Kladov <[email protected]> | 2020-11-06 21:21:56 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-11-06 21:23:14 +0000 |
commit | 5ba4f949c23dcf53f34995c90b7c01e6c641b1f0 (patch) | |
tree | fe5064dde4e948a776c87d38fba972903acad3ec /crates/assists/src/handlers/replace_let_with_if_let.rs | |
parent | 6725dcf847300b9cddcbb061b159317113860f31 (diff) |
Kill RAW_ literals
Syntactically, they are indistinguishable from non-raw versions, so it
doesn't make sense to separate then *at the syntax* level.
Diffstat (limited to 'crates/assists/src/handlers/replace_let_with_if_let.rs')
-rw-r--r-- | crates/assists/src/handlers/replace_let_with_if_let.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/assists/src/handlers/replace_let_with_if_let.rs b/crates/assists/src/handlers/replace_let_with_if_let.rs index a5bcbda24..69d3b08d3 100644 --- a/crates/assists/src/handlers/replace_let_with_if_let.rs +++ b/crates/assists/src/handlers/replace_let_with_if_let.rs | |||
@@ -37,7 +37,7 @@ use ide_db::ty_filter::TryEnum; | |||
37 | // fn compute() -> Option<i32> { None } | 37 | // fn compute() -> Option<i32> { None } |
38 | // ``` | 38 | // ``` |
39 | pub(crate) fn replace_let_with_if_let(acc: &mut Assists, ctx: &AssistContext) -> Option<()> { | 39 | pub(crate) fn replace_let_with_if_let(acc: &mut Assists, ctx: &AssistContext) -> Option<()> { |
40 | let let_kw = ctx.find_token_at_offset(T![let])?; | 40 | let let_kw = ctx.find_token_syntax_at_offset(T![let])?; |
41 | let let_stmt = let_kw.ancestors().find_map(ast::LetStmt::cast)?; | 41 | let let_stmt = let_kw.ancestors().find_map(ast::LetStmt::cast)?; |
42 | let init = let_stmt.initializer()?; | 42 | let init = let_stmt.initializer()?; |
43 | let original_pat = let_stmt.pat()?; | 43 | let original_pat = let_stmt.pat()?; |