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

perf: oer: format! in error messages causes allocation #387

Merged
merged 1 commit into from
Nov 29, 2024

Conversation

Nicceboy
Copy link
Contributor

@Nicceboy Nicceboy commented Nov 29, 2024

Use of format! in error message seemed to introduce allocation regardless whether error happened or not, and it was also in lazily evaluated context, so this is a bit odd.

Allocation does not happen if it is defined in snafu(display())

We likely need to measure impact of every error message then at some point...

I changed the error for OER in one place since it is in critical place.

@XAMPPRocky XAMPPRocky merged commit 8b42b54 into librasn:main Nov 29, 2024
65 checks passed
@github-actions github-actions bot mentioned this pull request Nov 29, 2024
@Nicceboy Nicceboy deleted the no-format-fix branch November 29, 2024 15: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