Skip to content

Commit 33748a6

Browse files
bors[bot]lnicola
andauthored
Merge #9671
9671: minor: Fix a couple of clippy nits r=lnicola a=lnicola bors r+ Co-authored-by: Laurențiu Nicola <[email protected]>
2 parents a36c9d8 + efcc487 commit 33748a6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

crates/ide/src/highlight_related.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,8 @@ fn highlight_yield_points(token: SyntaxToken) -> Option<Vec<HighlightedRange>> {
217217
async_token: Option<SyntaxToken>,
218218
body: Option<ast::Expr>,
219219
) -> Option<Vec<HighlightedRange>> {
220-
let mut highlights = Vec::new();
221-
highlights.push(HighlightedRange { access: None, range: async_token?.text_range() });
220+
let mut highlights =
221+
vec![HighlightedRange { access: None, range: async_token?.text_range() }];
222222
if let Some(body) = body {
223223
body.walk(&mut |expr| {
224224
if let ast::Expr::AwaitExpr(expr) = expr {

crates/rust-analyzer/src/handlers.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -769,8 +769,8 @@ pub(crate) fn handle_completion(
769769
snap.config.insert_replace_support(),
770770
completion_config.enable_imports_on_the_fly,
771771
&line_index,
772-
text_document_position.clone(),
773-
items.clone(),
772+
text_document_position,
773+
items,
774774
);
775775

776776
let completion_list = lsp_types::CompletionList { is_incomplete: true, items };

0 commit comments

Comments
 (0)