diff --git a/src/tools/rust-analyzer/crates/hir-def/src/test_db.rs b/src/tools/rust-analyzer/crates/hir-def/src/test_db.rs index a6a66dfb79a6..b52f4e1864b6 100644 --- a/src/tools/rust-analyzer/crates/hir-def/src/test_db.rs +++ b/src/tools/rust-analyzer/crates/hir-def/src/test_db.rs @@ -282,8 +282,8 @@ impl TestDB { base_db::EditionedFileId::new(db.as_dyn_database(), position.file_id); let root_syntax_node = db.parse(editioned_file_id_wrapper).syntax_node(); - let scope_iter = algo::ancestors_at_offset(&root_syntax_node, position.offset) - .filter_map(|node| { + let scope_iter = + algo::ancestors_at_offset(&root_syntax_node, position.offset).filter_map(|node| { let block = ast::BlockExpr::cast(node)?; let expr = ast::Expr::from(block); let expr_id = source_map diff --git a/src/tools/rust-analyzer/crates/ide/src/highlight_related.rs b/src/tools/rust-analyzer/crates/ide/src/highlight_related.rs index f367d76a126d..201f86876088 100644 --- a/src/tools/rust-analyzer/crates/ide/src/highlight_related.rs +++ b/src/tools/rust-analyzer/crates/ide/src/highlight_related.rs @@ -157,7 +157,10 @@ fn highlight_references( match resolution.map(Definition::from) { Some(def) => iter::once(def).collect(), None => { - return Some(vec![HighlightedRange { range, category: ReferenceCategory::empty() }]); + return Some(vec![HighlightedRange { + range, + category: ReferenceCategory::empty(), + }]); } } } else {