Fix enum problems in config
All checks were successful
Run Tests on Code / run-tests (push) Successful in 16s

This commit is contained in:
Neshura 2024-05-07 22:50:12 +02:00
parent e02cd900ed
commit 6a8c1662f0
Signed by: Neshura
GPG key ID: B6983AAA6B9A7A6C
2 changed files with 10 additions and 1 deletions

View file

@ -95,6 +95,15 @@ pub(crate) struct JNovelFetcher {
series_has_parts: bool series_has_parts: bool
} }
impl Default for JNovelFetcher {
fn default() -> Self {
Self {
series_slug: "".to_owned(),
series_has_parts: false,
}
}
}
impl JNovelFetcher { impl JNovelFetcher {
pub(crate) fn set_series(&mut self, series: String) { pub(crate) fn set_series(&mut self, series: String) {
self.series_slug = series; self.series_slug = series;

View file

@ -29,5 +29,5 @@ impl Fetcher {
#[derive(Deserialize, Serialize, Debug, Clone, Display)] #[derive(Deserialize, Serialize, Debug, Clone, Display)]
pub(crate) enum Fetcher { pub(crate) enum Fetcher {
#[serde(rename = "jnc")] #[serde(rename = "jnc")]
Jnc(JNovelFetcher) Jnc(#[serde(skip)] JNovelFetcher)
} }