Fix enum problems in config
All checks were successful
Run Tests on Code / run-tests (push) Successful in 16s
All checks were successful
Run Tests on Code / run-tests (push) Successful in 16s
This commit is contained in:
parent
e02cd900ed
commit
6a8c1662f0
2 changed files with 10 additions and 1 deletions
|
@ -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;
|
||||||
|
|
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue