Skip to content

Commit c12446c

Browse files
committed
refactor(test2): Leverage RunResult
1 parent 9107d73 commit c12446c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

crates/libtest2/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ use libtest2_harness::TestKind;
4949
pub struct Trial {
5050
name: String,
5151
#[allow(clippy::type_complexity)]
52-
runner: Box<dyn Fn(&TestContext) -> Result<(), RunError> + Send + Sync>,
52+
runner: Box<dyn Fn(&TestContext) -> RunResult + Send + Sync>,
5353
}
5454

5555
impl Trial {
5656
pub fn test(
5757
name: impl Into<String>,
58-
runner: impl Fn(&TestContext) -> Result<(), RunError> + Send + Sync + 'static,
58+
runner: impl Fn(&TestContext) -> RunResult + Send + Sync + 'static,
5959
) -> Self {
6060
Self {
6161
name: name.into(),
@@ -78,7 +78,7 @@ impl Case for Trial {
7878
false
7979
}
8080

81-
fn run(&self, context: &TestContext) -> Result<(), RunError> {
81+
fn run(&self, context: &TestContext) -> RunResult {
8282
(self.runner)(context)
8383
}
8484
}

0 commit comments

Comments
 (0)