diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-07-31 21:05:10 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-07-31 21:05:10 +0100 |
commit | 2346a28c638dc8fe945059b68126d268dd7fb690 (patch) | |
tree | 4cfe573d8d6c49c3f92f4a56e5fae3af2b37c1a0 /crates/ra_assists/src | |
parent | 1914d0aa7b5518c743e7403da6d7eea3fe28e955 (diff) | |
parent | 8cf19847ddbcbbe1c1bb634dfc4a61ab75ec941d (diff) |
Merge #5634
5634: Finish rename r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_assists/src')
-rw-r--r-- | crates/ra_assists/src/handlers/early_return.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_assists/src/handlers/early_return.rs b/crates/ra_assists/src/handlers/early_return.rs index 3650289fd..69852b611 100644 --- a/crates/ra_assists/src/handlers/early_return.rs +++ b/crates/ra_assists/src/handlers/early_return.rs | |||
@@ -51,11 +51,11 @@ pub(crate) fn convert_to_guarded_return(acc: &mut Assists, ctx: &AssistContext) | |||
51 | // Check if there is an IfLet that we can handle. | 51 | // Check if there is an IfLet that we can handle. |
52 | let if_let_pat = match cond.pat() { | 52 | let if_let_pat = match cond.pat() { |
53 | None => None, // No IfLet, supported. | 53 | None => None, // No IfLet, supported. |
54 | Some(ast::Pat::TupleStructPat(pat)) if pat.args().count() == 1 => { | 54 | Some(ast::Pat::TupleStructPat(pat)) if pat.fields().count() == 1 => { |
55 | let path = pat.path()?; | 55 | let path = pat.path()?; |
56 | match path.qualifier() { | 56 | match path.qualifier() { |
57 | None => { | 57 | None => { |
58 | let bound_ident = pat.args().next().unwrap(); | 58 | let bound_ident = pat.fields().next().unwrap(); |
59 | Some((path, bound_ident)) | 59 | Some((path, bound_ident)) |
60 | } | 60 | } |
61 | Some(_) => return None, | 61 | Some(_) => return None, |