Skip to content

fix: Optimize Alias::new() and Parser::fix_aliases_namespace#557

Merged
Kriskras99 merged 1 commit into
mainfrom
fix/optimize_alias_new
Jun 18, 2026
Merged

fix: Optimize Alias::new() and Parser::fix_aliases_namespace#557
Kriskras99 merged 1 commit into
mainfrom
fix/optimize_alias_new

Conversation

@Kriskras99

Copy link
Copy Markdown
Contributor

I noticed a missed optimization opportunity.
Using impl Into<String> + AsRef<str> allows us to reuse the allocation if the input is a String.
And by using .into_iter() in fix_aliases_namespace we get an allocation we can reuse.

@martin-g

Copy link
Copy Markdown
Member

Maybe the PR title should be refactor:.... ?

@Kriskras99 Kriskras99 force-pushed the fix/optimize_alias_new branch from f3b98e6 to b152367 Compare June 18, 2026 06:43
@Kriskras99

Copy link
Copy Markdown
Contributor Author

I've renamed it to perf: ..., which seems the best fit!

@Kriskras99 Kriskras99 merged commit 40390dd into main Jun 18, 2026
13 checks passed
@Kriskras99 Kriskras99 deleted the fix/optimize_alias_new branch June 18, 2026 06:48
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