Skip to content

Commit 5d948ca

Browse files
Merge #10335
10335: internal: Avoid some `Arc` cloning r=jonas-schievink a=jonas-schievink bors r+ Co-authored-by: Jonas Schievink <[email protected]>
2 parents eb17e90 + b8eb63f commit 5d948ca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/hir_expand/src/hygiene.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ impl Hygiene {
5353
pub fn local_inner_macros(&self, db: &dyn AstDatabase, path: ast::Path) -> Option<CrateId> {
5454
let mut token = path.syntax().first_token()?.text_range();
5555
let frames = self.frames.as_ref()?;
56-
let mut current = frames.0.clone();
56+
let mut current = &frames.0;
5757

5858
loop {
5959
let (mapped, origin) = current.expansion.as_ref()?.map_ident_up(db, token)?;
@@ -64,7 +64,7 @@ impl Hygiene {
6464
None
6565
};
6666
}
67-
current = current.call_site.as_ref()?.clone();
67+
current = current.call_site.as_ref()?;
6868
token = mapped.value;
6969
}
7070
}

0 commit comments

Comments
 (0)