Skip to content

Commit 4e791b0

Browse files
authored
perf(lowering-cache): avoid unnecessary Arc and clone in crate cache (#9014)
1 parent 214159a commit 4e791b0

File tree

1 file changed

+2
-2
lines changed
  • crates/cairo-lang-lowering/src/cache

1 file changed

+2
-2
lines changed

crates/cairo-lang-lowering/src/cache/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,14 +159,14 @@ pub fn generate_crate_cache<'db>(
159159
.iter()
160160
.filter_map(|id| {
161161
db.function_body(*id).ok()?;
162-
let multi = match lower_semantic_function(db, *id).map(Arc::new) {
162+
let multi = match lower_semantic_function(db, *id) {
163163
Ok(multi) => multi,
164164
Err(err) => return Some(Err(err)),
165165
};
166166

167167
Some(Ok((
168168
DefsFunctionWithBodyIdCached::new(*id, &mut ctx.semantic_ctx),
169-
MultiLoweringCached::new((*multi).clone(), &mut ctx),
169+
MultiLoweringCached::new(multi, &mut ctx),
170170
)))
171171
})
172172
.collect::<Maybe<Vec<_>>>()?;

0 commit comments

Comments
 (0)