From f01cfe911410a2f35f95ec1e7befb51d51a5343e Mon Sep 17 00:00:00 2001 From: Kirill Bulatov Date: Mon, 18 Jan 2021 21:20:02 +0200 Subject: [PATCH] Small token fix Co-authored-by: Aleksey Kladov --- crates/completion/src/completions/flyimport.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/completion/src/completions/flyimport.rs b/crates/completion/src/completions/flyimport.rs index 5c04d5c41a5..47e797ac8bf 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) } let potential_import_name = { let token_kind = ctx.token.kind(); - if token_kind == T![.] || token_kind == T![::] { + if matches!(token_kind, T![.] | T![::]) { String::new() } else { ctx.token.to_string()