Unnamed repository; edit this file 'description' to name the repository.
Merge #10335
10335: internal: Avoid some `Arc` cloning r=jonas-schievink a=jonas-schievink bors r+ Co-authored-by: Jonas Schievink <[email protected]>
bors[bot] 2021-09-24
parent eb17e90 · parent b8eb63f · commit 5d948ca
-rw-r--r--crates/hir_expand/src/hygiene.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/hir_expand/src/hygiene.rs b/crates/hir_expand/src/hygiene.rs
index 959cd73b5d..a1c519b804 100644
--- a/crates/hir_expand/src/hygiene.rs
+++ b/crates/hir_expand/src/hygiene.rs
@@ -53,7 +53,7 @@ impl Hygiene {
pub fn local_inner_macros(&self, db: &dyn AstDatabase, path: ast::Path) -> Option<CrateId> {
let mut token = path.syntax().first_token()?.text_range();
let frames = self.frames.as_ref()?;
- let mut current = frames.0.clone();
+ let mut current = &frames.0;
loop {
let (mapped, origin) = current.expansion.as_ref()?.map_ident_up(db, token)?;
@@ -64,7 +64,7 @@ impl Hygiene {
None
};
}
- current = current.call_site.as_ref()?.clone();
+ current = current.call_site.as_ref()?;
token = mapped.value;
}
}