9523: fix: Don't add the trait name to the insert text in completions r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
This commit is contained in:
bors[bot] 2021-07-07 17:42:55 +00:00 committed by GitHub
commit 9912b073c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -437,6 +437,7 @@ pub(crate) fn build(self) -> CompletionItem {
format_to!(label, " (use {})", original_path)
}
} else if let Some(trait_name) = self.trait_name {
insert_text = insert_text.or_else(|| Some(label.clone()));
format_to!(label, " (as {})", trait_name)
}