From 6a8c1662f02e52fa7da3dada8c7bcb96dc5e9e58 Mon Sep 17 00:00:00 2001 From: Neshura Date: Tue, 7 May 2024 22:50:12 +0200 Subject: [PATCH] Fix enum problems in config --- src/fetchers/jnovel.rs | 9 +++++++++ src/fetchers/mod.rs | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/fetchers/jnovel.rs b/src/fetchers/jnovel.rs index 6a7e437..c13c626 100644 --- a/src/fetchers/jnovel.rs +++ b/src/fetchers/jnovel.rs @@ -95,6 +95,15 @@ pub(crate) struct JNovelFetcher { series_has_parts: bool } +impl Default for JNovelFetcher { + fn default() -> Self { + Self { + series_slug: "".to_owned(), + series_has_parts: false, + } + } +} + impl JNovelFetcher { pub(crate) fn set_series(&mut self, series: String) { self.series_slug = series; diff --git a/src/fetchers/mod.rs b/src/fetchers/mod.rs index ce05d8a..0f2eacc 100644 --- a/src/fetchers/mod.rs +++ b/src/fetchers/mod.rs @@ -29,5 +29,5 @@ impl Fetcher { #[derive(Deserialize, Serialize, Debug, Clone, Display)] pub(crate) enum Fetcher { #[serde(rename = "jnc")] - Jnc(JNovelFetcher) + Jnc(#[serde(skip)] JNovelFetcher) }