3 ms·
> you're still constrained to a single type of error per function This is true, but the ? operator expands into a form that does `.into()` conversions of the e
by treyd 3y ago
> you're still constrained to a single type of error per function
This is true, but the ? operator expands into a form that does `.into()` conversions of the error variants. If there's a implementation of `From`/`Into` between the error type you're unwrapping and the error type on the function, it automatically converts. This is aided by the "thiserror" crate which provides a derive macro that can generate these automatically.