File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -80,3 +80,12 @@ impl IntoRunResult for RunResult {
8080 self
8181 }
8282}
83+
84+ impl < E > IntoRunResult for Result < ( ) , E >
85+ where
86+ E : std:: error:: Error + Send + Sync + ' static ,
87+ {
88+ fn into_run_result ( self ) -> RunResult {
89+ self . map_err ( RunError :: with_cause)
90+ }
91+ }
Original file line number Diff line number Diff line change @@ -65,8 +65,8 @@ fn horse(context: &libtest2::TestContext) {
6565}
6666
6767#[libtest2::test]
68- fn custom_error(context: &libtest2::TestContext) -> libtest2::RunResult {
69- Err(libtest2::RunError::from( std::io::Error::new(std::io::ErrorKind::Other, "I failed") ))
68+ fn custom_error(context: &libtest2::TestContext) -> std::io::Result<()> {
69+ Err(std::io::Error::new(std::io::ErrorKind::Other, "I failed"))
7070}
7171
7272"# ,
You can’t perform that action at this time.
0 commit comments