Skip to content

Commit

Permalink
Avoid clone
Browse files Browse the repository at this point in the history
Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com>
  • Loading branch information
asterite and TomAFrench committed Jul 4, 2024
1 parent 646e80c commit 2a8ea80
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions compiler/noirc_frontend/src/hir/def_collector/dc_crate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -342,9 +342,7 @@ impl DefCollector {
let current_def_map = context.def_maps.get(&crate_id).unwrap();
let file_id = current_def_map.file_id(module_id);

for (referenced, ident) in
references.iter().zip(collected_import.clone().path.segments)
{
for (referenced, ident) in references.iter().zip(&collected_import.path.segments) {
let reference = ReferenceId::Variable(Location::new(ident.span(), file_id));
context.def_interner.add_reference(*referenced, reference);
}
Expand Down

0 comments on commit 2a8ea80

Please sign in to comment.