1 2 3 4 5 6 7 8 9 10
use std::sync::Once; static START: Once = Once::new(); /// Setup function that is only run once, even if called multiple times. pub fn setup() { START.call_once(|| { env_logger::init(); }); }