struct MyErrorType; let last = try!(vec![1,2,3].last().ok_or(MyErrorType)); // strings are convertible to errors, so you can use them too.
確定! 回上一頁