-
Notifications
You must be signed in to change notification settings - Fork 295
reencoder: allow implementers to fail to reencode indices and such #2179
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
reencoder: allow implementers to fail to reencode indices and such #2179
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this! I think this is reasonable to support given that most of the other methods already return an error as well, and I've wanted something like this in the past as well.
Bikeshed-wise though I might recommend that these methods return the same error as most other methods, which is Result<u32, Error<Self::Error>>
. That would avoid the need for conversions and remembering to use the right .map_err
at all use-sites.
Hm, in that case I would perhaps go in the other direction of getting rid of |
I do agree Perhaps as a further refinement of your idea, a |
I updated this to use Error universally. |
Ah that's a merge conflict with #2145 which just landed prior, I can help resolve too as well if you'd like. |
If you don't find an opportunity to, I'll get to it tonight or tomorrow myself. |
ebd295d
to
02d3086
Compare
I have found myself wanting to return an error from `Reencode::type_index`. This is admittedly a pretty invasive change though and I punted on component stuff.
02d3086
to
e743697
Compare
This is ready to go again now. |
I have found myself wanting to return an error from
Reencode::type_index
. This is admittedly a pretty invasive change though and I punted on component stuff.Thoughts?