-
Notifications
You must be signed in to change notification settings - Fork 14.1k
Improve io::Error::downcast
#149521
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
base: main
Are you sure you want to change the base?
Improve io::Error::downcast
#149521
Conversation
This comment has been minimized.
This comment has been minimized.
3f5c449 to
126b4d2
Compare
|
The |
|
Wow, I somehow managed to convince myself that the Given the current situation, removing this box is probably not beneficial indeed. I'll remove the second commit. |
126b4d2 to
7de190a
Compare
io::Error: avoid double-boxing of "custom" variant on 32 bits targetsio::Error::downcast: avoid reallocation in case of failure
io::Error::downcast: avoid reallocation in case of failureio::Error::downcast:
|
@bors r+ |
Rewrite this function to help to compiler understand what is going on here.