diff --git a/Cargo.lock b/Cargo.lock index 878571e..f89149d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1638,7 +1638,7 @@ checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" [[package]] name = "site_icons" -version = "0.4.6" +version = "0.4.7" dependencies = [ "byteorder", "clap", diff --git a/Cargo.toml b/Cargo.toml index 192b523..500635a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "site_icons" -version = "0.4.6" +version = "0.4.7" authors = ["Sam Denty "] edition = "2018" license = "GPL-3.0" diff --git a/src/icons.rs b/src/icons.rs index fc3804c..1aa7d0d 100644 --- a/src/icons.rs +++ b/src/icons.rs @@ -310,9 +310,9 @@ impl Icons { } } - let (href, _, _) = logos.into_iter().next().unwrap(); - - self.add_icon(href, IconKind::SiteLogo, None); + if let Some((href, _, _)) = logos.into_iter().next() { + self.add_icon(href, IconKind::SiteLogo, None); + } } for elem_ref in document.select(selector!("link[rel='manifest']")) {