9671: minor: Fix a couple of clippy nits r=lnicola a=lnicola

bors r+

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
This commit is contained in:
bors[bot] 2021-07-22 06:04:25 +00:00 committed by GitHub
commit 33748a6fce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -217,8 +217,8 @@ fn highlight_yield_points(token: SyntaxToken) -> Option<Vec<HighlightedRange>> {
async_token: Option<SyntaxToken>,
body: Option<ast::Expr>,
) -> Option<Vec<HighlightedRange>> {
let mut highlights = Vec::new();
highlights.push(HighlightedRange { access: None, range: async_token?.text_range() });
let mut highlights =
vec![HighlightedRange { access: None, range: async_token?.text_range() }];
if let Some(body) = body {
body.walk(&mut |expr| {
if let ast::Expr::AwaitExpr(expr) = expr {

View file

@ -769,8 +769,8 @@ pub(crate) fn handle_completion(
snap.config.insert_replace_support(),
completion_config.enable_imports_on_the_fly,
&line_index,
text_document_position.clone(),
items.clone(),
text_document_position,
items,
);
let completion_list = lsp_types::CompletionList { is_incomplete: true, items };