From c6c127edbbc858b7fcbdc0c5eb491691de631939 Mon Sep 17 00:00:00 2001 From: trivernis Date: Sun, 3 Jul 2022 16:59:14 +0200 Subject: [PATCH] Fix mapping of notes Signed-off-by: trivernis --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/models.rs | 3 ++- src/tests/test_client.rs | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index da42215..77cee2a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,7 +4,7 @@ version = 3 [[package]] name = "animethemes-rs" -version = "0.4.1" +version = "0.4.2" dependencies = [ "reqwest", "serde", diff --git a/Cargo.toml b/Cargo.toml index 9d0dc99..45315af 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "animethemes-rs" -version = "0.4.2" +version = "0.4.3" authors = ["trivernis "] edition = "2021" readme = "README.md" diff --git a/src/models.rs b/src/models.rs index c38efc4..cfe4fa7 100644 --- a/src/models.rs +++ b/src/models.rs @@ -33,6 +33,7 @@ pub enum AnimeSeason { Summer, Fall, } + #[derive(Debug, Clone, Deserialize)] pub struct AnimeSynonym { #[serde(flatten)] @@ -93,7 +94,7 @@ pub struct ThemeEntry { pub episodes: String, pub nsfw: bool, pub spoiler: bool, - pub notes: String, + pub notes: Option, pub videos: Option>, #[serde(alias = "animetheme")] pub theme: Option, diff --git a/src/tests/test_client.rs b/src/tests/test_client.rs index d3a6e6f..c206126 100644 --- a/src/tests/test_client.rs +++ b/src/tests/test_client.rs @@ -6,7 +6,7 @@ async fn it_searches() { let client = AnimeThemesClient::default(); let result = client .search( - "vivy", + "paripi", &[], SearchIncludes { anime: AnimeInclude::default().images().series(),