Explain tests::init function
This commit is contained in:
parent
a1e0d0df79
commit
bc07c19961
1 changed files with 2 additions and 2 deletions
|
|
@ -329,8 +329,8 @@ fn main() {
|
|||
}
|
||||
}
|
||||
|
||||
static INIT: std::sync::Once = std::sync::Once::new();
|
||||
|
||||
/// Call this from every test to initialize eyre only once across all tests.
|
||||
pub fn init() {
|
||||
static INIT: std::sync::Once = std::sync::Once::new();
|
||||
INIT.call_once(|| color_eyre::install().unwrap());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue