1 2 3 4 5 6 7 8 9 10 11 12
use std::sync::{Once, ONCE_INIT}; #[allow(dead_code)] static INIT: Once = ONCE_INIT; /// Setup function that is only run once, even if called multiple times. #[allow(dead_code)] pub(crate) fn setup() { INIT.call_once(|| { env_logger::init(); }); }