mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-09 17:55:10 +00:00
move function
This commit is contained in:
parent
22ce499096
commit
ea5891857b
|
@ -132,6 +132,12 @@ impl Settings {
|
||||||
Ok(Self::read_config_file()?)
|
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 {
|
pub fn database(&self) -> DatabaseConfig {
|
||||||
self.database.to_owned().unwrap_or_default()
|
self.database.to_owned().unwrap_or_default()
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,13 +21,7 @@ pub struct Settings {
|
||||||
pub(crate) actor_name_max_length: Option<usize>,
|
pub(crate) actor_name_max_length: Option<usize>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Settings {
|
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())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Debug, Deserialize, Clone)]
|
#[derive(Debug, Deserialize, Clone)]
|
||||||
pub struct CaptchaConfig {
|
pub struct CaptchaConfig {
|
||||||
|
|
Loading…
Reference in a new issue