Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit bc07c19

Browse files
committed
Explain tests::init function
1 parent a1e0d0d commit bc07c19

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ui_test/src/tests.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,8 +329,8 @@ fn main() {
329329
}
330330
}
331331

332-
static INIT: std::sync::Once = std::sync::Once::new();
333-
332+
/// Call this from every test to initialize eyre only once across all tests.
334333
pub fn init() {
334+
static INIT: std::sync::Once = std::sync::Once::new();
335335
INIT.call_once(|| color_eyre::install().unwrap());
336336
}

0 commit comments

Comments
 (0)