Skip to content

Commit

Permalink
Remove over-eager cloning of iterators
Browse files Browse the repository at this point in the history
  • Loading branch information
thibault-martinez committed Sep 24, 2023
1 parent e29475a commit aa2e12e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ impl InputSelection {
}

// Remove potential sender feature because it will not be needed anymore as it only needs to be verified once.
let features = input.features().iter().cloned().filter(|feature| !feature.is_sender());
let features = input.features().iter().filter(|feature| !feature.is_sender()).cloned();

let mut builder = AliasOutputBuilder::from(input)
.with_alias_id(alias_id)
Expand Down Expand Up @@ -101,7 +101,7 @@ impl InputSelection {
}

// Remove potential sender feature because it will not be needed anymore as it only needs to be verified once.
let features = input.features().iter().cloned().filter(|feature| !feature.is_sender());
let features = input.features().iter().filter(|feature| !feature.is_sender()).cloned();

let output = NftOutputBuilder::from(input)
.with_nft_id(nft_id)
Expand Down

0 comments on commit aa2e12e

Please sign in to comment.