diff --git a/crates/utils/src/settings/mod.rs b/crates/utils/src/settings/mod.rs index 8c9f82ccf..1e528d93e 100644 --- a/crates/utils/src/settings/mod.rs +++ b/crates/utils/src/settings/mod.rs @@ -132,6 +132,12 @@ impl Settings { Ok(Self::read_config_file()?) } + pub(crate) fn actor_name_max_length(&self) -> usize { + self + .actor_name_max_length + .unwrap_or_else(|| Settings::default().actor_name_max_length.unwrap()) + } + pub fn database(&self) -> DatabaseConfig { self.database.to_owned().unwrap_or_default() } diff --git a/crates/utils/src/settings/structs.rs b/crates/utils/src/settings/structs.rs index ede1ce88c..fd621066c 100644 --- a/crates/utils/src/settings/structs.rs +++ b/crates/utils/src/settings/structs.rs @@ -21,13 +21,7 @@ pub struct Settings { pub(crate) actor_name_max_length: Option, } -impl Settings { - pub(crate) fn actor_name_max_length(&self) -> usize { - self - .actor_name_max_length - .unwrap_or_else(|| Settings::default().actor_name_max_length.unwrap()) - } -} +impl Settings {} #[derive(Debug, Deserialize, Clone)] pub struct CaptchaConfig {