Skip to content

chore: use extend pattern when possible#413

Merged
kylewlacy merged 1 commit intomainfrom
extend-pattern
Jan 29, 2026
Merged

chore: use extend pattern when possible#413
kylewlacy merged 1 commit intomainfrom
extend-pattern

Conversation

@jaudiger
Copy link
Contributor

@jaudiger jaudiger requested a review from kylewlacy January 27, 2026 07:46
@jaudiger jaudiger self-assigned this Jan 27, 2026
Signed-off-by: Jérémy Audiger <jeremy.audiger@icloud.com>
&self,
project_hashes: &HashSet<ProjectHash>,
) -> anyhow::Result<impl Iterator<Item = PathBuf>> {
let mut paths = Vec::with_capacity(project_hashes.len());
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Normally the code should preallocate the vector on collect correctly, by doing a size_of() on project_hashes.

@kylewlacy kylewlacy merged commit fcb6b18 into main Jan 29, 2026
10 checks passed
@kylewlacy kylewlacy deleted the extend-pattern branch January 29, 2026 04:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants