diff options
author | Kirill Bulatov <[email protected]> | 2021-01-18 19:20:02 +0000 |
---|---|---|
committer | Kirill Bulatov <[email protected]> | 2021-01-18 19:30:04 +0000 |
commit | f01cfe911410a2f35f95ec1e7befb51d51a5343e (patch) | |
tree | 7f4c6060aa9a73115bfa7f4f7f327fda9449bc15 /crates/completion/src/completions/flyimport.rs | |
parent | d1ac3293f4aa0f0807cfb9a9d5337c6a4a2632d7 (diff) |
Small token fix
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/completion/src/completions/flyimport.rs')
-rw-r--r-- | crates/completion/src/completions/flyimport.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/completion/src/completions/flyimport.rs b/crates/completion/src/completions/flyimport.rs index 5c04d5c41..47e797ac8 100644 --- a/crates/completion/src/completions/flyimport.rs +++ b/crates/completion/src/completions/flyimport.rs | |||
@@ -73,7 +73,7 @@ pub(crate) fn import_on_the_fly(acc: &mut Completions, ctx: &CompletionContext) | |||
73 | } | 73 | } |
74 | let potential_import_name = { | 74 | let potential_import_name = { |
75 | let token_kind = ctx.token.kind(); | 75 | let token_kind = ctx.token.kind(); |
76 | if token_kind == T![.] || token_kind == T![::] { | 76 | if matches!(token_kind, T![.] | T![::]) { |
77 | String::new() | 77 | String::new() |
78 | } else { | 78 | } else { |
79 | ctx.token.to_string() | 79 | ctx.token.to_string() |