use lazy_static::lazy_static; lazy_static! { pub static ref USER_CONFIG_DIR: String = { match dirs::config_local_dir() { Some(mut d) => { d.push("neosheet"); d.as_path().to_str().unwrap_or("").to_string() } None => String::new(), } }; pub static ref USER_RC_PATH: String = { match dirs::config_local_dir() { Some(mut d) => { d.push("neosheet"); d.push("init.lua"); d.as_path().to_str().unwrap_or("").to_string() } None => String::new(), } }; }