Removed some unwrap()s.

This commit is contained in:
Jordan Petridis
2018-01-09 09:21:07 +02:00
parent 87a259e1a4
commit ea70addbc6
4 changed files with 38 additions and 32 deletions
+1 -4
View File
@@ -205,10 +205,7 @@ impl EpisodesViewWidget {
let image: gtk::Image = builder.get_object("cover").unwrap();
if let Ok(pd) = dbqueries::get_podcast_cover_from_id(episode.podcast_id()) {
let img = get_pixbuf_from_path(&pd, 64);
if let Some(i) = img {
image.set_from_pixbuf(&i);
}
get_pixbuf_from_path(&pd, 64).map(|img| image.set_from_pixbuf(&img));
}
let ep = EpisodeWidget::new(episode, sender.clone());