Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filters |fmt and |format needlessly (?) allocate string #113

Open
Kijewski opened this issue Aug 5, 2024 · 1 comment
Open

Filters |fmt and |format needlessly (?) allocate string #113

Kijewski opened this issue Aug 5, 2024 · 1 comment

Comments

@Kijewski
Copy link
Collaborator

Kijewski commented Aug 5, 2024

The filters |fmt and |format use format!(), but I think they could use format_args!(), so they don't have to allocate a string to do their work. Are there any drawbacks to replacing their format!() call with format_args!()?

@GuillaumeGomez
Copy link
Contributor

GuillaumeGomez commented Aug 5, 2024

Good idea!

PS: Like that, I can't think of any drawback but we'd need to test it to ensure that.

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

No branches or pull requests

2 participants