mirror of
https://github.com/LemmyNet/lemmy
synced 2024-11-13 00:07:08 +00:00
move function
This commit is contained in:
parent
22ce499096
commit
ea5891857b
2 changed files with 7 additions and 7 deletions
|
@ -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()
|
||||
}
|
||||
|
|
|
@ -21,13 +21,7 @@ pub struct Settings {
|
|||
pub(crate) actor_name_max_length: Option<usize>,
|
||||
}
|
||||
|
||||
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 {
|
||||
|
|
Loading…
Reference in a new issue