Skip to content

Commit

Permalink
chore: Reduce string copy
Browse files Browse the repository at this point in the history
  • Loading branch information
sbwtw committed Nov 12, 2024
1 parent 531f5e9 commit 598eef2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/src/ast/variable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ impl Variable {
ty: Type,
) -> SmallVec8<Arc<Self>> {
names
.iter()
.map(|x| Arc::new(Self::with_type(x.clone(), ty.clone())))
.into_iter()
.map(|x| Arc::new(Self::with_type(x, ty.clone())))
.collect()
}

Expand Down

0 comments on commit 598eef2

Please sign in to comment.