Open Zk2u opened 7 months ago
I haven't found a way to support this using the current type system due to the requirement of having an additional Index type which allows the prolog-like type system to resolve correctly. If you or anyone else finds a way to support this with the stable From trait I would be very curious to see how it is possible.
Taking the example:
Instead of using
allocate_box().map_err(OneOf::broaden)?
, we could implementInto
for any subset of aOneOf
so this can be simplified to justallocate_box()?
, and the?
operator will implicitly broaden the error.