diff --git a/Cargo.lock b/Cargo.lock index 072dc9f..a585d4e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -389,7 +389,7 @@ dependencies = [ [[package]] name = "nhentairs" -version = "0.5.3" +version = "0.5.4" dependencies = [ "reqwest", "serde", diff --git a/Cargo.toml b/Cargo.toml index 95b0c5e..50f4e97 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nhentairs" -version = "0.5.3" +version = "0.5.4" authors = ["blank X "] edition = "2018" diff --git a/src/structs.rs b/src/structs.rs index ed7e33a..7c02b89 100644 --- a/src/structs.rs +++ b/src/structs.rs @@ -72,9 +72,9 @@ impl fmt::Display for GalleryInfoSuccess { let mut text = format!("Sauce: {}\nTitle: ", self.id); let japanese_title = self.title.japanese.as_ref(); let english_title = self.title.english.as_ref(); - if english_title.is_some() { + if english_title.filter(|i| !i.is_empty()).is_some() { text.push_str(english_title.unwrap()); - if japanese_title.is_some() { + if japanese_title.filter(|i| !i.is_empty()).is_some() { text.push_str(&format!("\nJapanese Title: {}", japanese_title.unwrap())); } } else {