diff --git a/citadel-realms/src/config.rs b/citadel-realms/src/config.rs index 4e748e4..fa17d9e 100644 --- a/citadel-realms/src/config.rs +++ b/citadel-realms/src/config.rs @@ -6,13 +6,8 @@ lazy_static! { pub static ref GLOBAL_CONFIG: RealmConfig = RealmConfig::load_global_config(); } -fn default_zone() -> String { - "clear".to_owned() -} - -fn default_realmfs() -> String { - "base".to_owned() -} +const DEFAULT_ZONE: &str = "clear"; +const DEFAULT_REALMFS: &str = "base"; #[derive (Deserialize,Clone)] pub struct RealmConfig { @@ -90,8 +85,8 @@ impl RealmConfig { use_kvm: Some(false), use_gpu: Some(false), use_network: Some(true), - network_zone: Some(default_zone()), - realmfs: Some(default_realmfs()), + network_zone: Some(DEFAULT_ZONE.into()), + realmfs: Some(DEFAULT_REALMFS.into()), realmfs_write: Some(false), parent: None, } @@ -153,7 +148,6 @@ impl RealmConfig { } } "" - } fn bool_value(&self, get: F) -> bool @@ -167,6 +161,5 @@ impl RealmConfig { return get(parent).unwrap_or(false); } false - } } diff --git a/citadel-realms/src/main.rs b/citadel-realms/src/main.rs index f6405bf..0474993 100644 --- a/citadel-realms/src/main.rs +++ b/citadel-realms/src/main.rs @@ -35,8 +35,6 @@ mod systemd; mod config; mod network; -use libcitadel::RealmFS; - use crate::realm::{Realm,RealmSymlinks}; use crate::manager::RealmManager; use crate::config::RealmConfig;