#[derive(Debug)]
struct MyErrorWithParam<T> {
- x: T
+ x: T,
}
fn main() {
// the error type implements `Debug`
let res2: Result<i32, MyError> = Ok(0);
res2.ok().expect("oh noes!");
- let res3: Result<u32, MyErrorWithParam<u8>>= Ok(0);
+ let res3: Result<u32, MyErrorWithParam<u8>> = Ok(0);
res3.ok().expect("whoof");
let res4: Result<u32, io::Error> = Ok(0);
res4.ok().expect("argh");