pub trait ResultInto<T, E> {
// Required method
fn res_into(self) -> Result<T, E>;
}
Expand description
Maps both the Value and the Error of a Result
using Into::into
Shorthand for result.map(Into::into).map_err(Into::into)
use err_into::ResultInto;
let res: Result<u8, i8> = Ok(0);
let _: Result<i32, i16> = res.res_into();