Skip to content

Commit 9f4dfed

Browse files
authored
fix!: Fix typo in TestContext::elapsed_s (#134)
This function seems to have been incorrectly named `elapased_s`, which is not a word ofcourse. Just thought I'd fix it. The `_s` suffix is still a bit confusing to me, but it seems to be used a lot of places in the codebase, so I assume this is intentional.
2 parents 4090196 + 0fa1b61 commit 9f4dfed

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

crates/libtest2-harness/src/context.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ impl TestContext {
3333
self.notifier().notify(event)
3434
}
3535

36-
pub fn elapased_s(&self) -> notify::Elapsed {
36+
pub fn elapsed_s(&self) -> notify::Elapsed {
3737
notify::Elapsed(self.start.elapsed())
3838
}
3939

crates/libtest2-harness/src/harness.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ fn run_case(case: &dyn Case, context: &TestContext) -> std::io::Result<bool> {
438438
context.notifier().notify(
439439
notify::event::CaseStart {
440440
name: case.name().to_owned(),
441-
elapsed_s: Some(context.elapased_s()),
441+
elapsed_s: Some(context.elapsed_s()),
442442
}
443443
.into(),
444444
)?;
@@ -472,7 +472,7 @@ fn run_case(case: &dyn Case, context: &TestContext) -> std::io::Result<bool> {
472472
name: case.name().to_owned(),
473473
kind,
474474
message,
475-
elapsed_s: Some(context.elapased_s()),
475+
elapsed_s: Some(context.elapsed_s()),
476476
}
477477
.into(),
478478
)?;
@@ -481,7 +481,7 @@ fn run_case(case: &dyn Case, context: &TestContext) -> std::io::Result<bool> {
481481
context.notifier().notify(
482482
notify::event::CaseComplete {
483483
name: case.name().to_owned(),
484-
elapsed_s: Some(context.elapased_s()),
484+
elapsed_s: Some(context.elapsed_s()),
485485
}
486486
.into(),
487487
)?;

0 commit comments

Comments
 (0)