Impl Default trait
This commit is contained in:
@@ -3,7 +3,7 @@ use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::{
|
||||
resident::{Resident, ResidentDTO},
|
||||
slot::Day
|
||||
slot::Day,
|
||||
};
|
||||
|
||||
const YEAR: i32 = 2026;
|
||||
@@ -78,8 +78,10 @@ impl UserConfig {
|
||||
day.is_weekend(self.month.number_from_month(), self.year)
|
||||
|| self.holidays.contains(&(day.0 as usize))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn default() -> Self {
|
||||
impl Default for UserConfig {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
month: Month::try_from(2).unwrap(),
|
||||
year: YEAR,
|
||||
|
||||
Reference in New Issue
Block a user