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

Omicron's Error::internal_error could be more general #4892

Open
bnaecker opened this issue Jan 25, 2024 · 0 comments
Open

Omicron's Error::internal_error could be more general #4892

bnaecker opened this issue Jan 25, 2024 · 0 comments

Comments

@bnaecker
Copy link
Collaborator

This was raised by @ahl in the following context:

          maybe change `internal_error`?
image

Maybe these should accept impl ToString ? or AsRef<str>

Originally posted by @ahl in #4874 (comment)

I have often found myself creating an internal error by calling foo.to_string() here. That causes an allocation at the call site, passes a reference from which a new allocation is made, and then throws away the original. It might be nice to take something like impl ToString and call to_string() internally.

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

1 participant