Remove another unwrap. Though it would never be hit currently.

This commit is contained in:
Jordan Petridis 2018-02-08 21:34:11 +02:00
parent 1135d77147
commit 45522b86df
No known key found for this signature in database
GPG Key ID: CEABAD9F5683B9A6

View File

@ -20,7 +20,12 @@ fn download_checker() -> Result<(), DataError> {
episodes episodes
.par_iter_mut() .par_iter_mut()
.filter(|ep| !Path::new(ep.local_uri().unwrap()).exists()) .filter_map(|ep| {
if !Path::new(ep.local_uri()?).exists() {
return Some(ep);
}
None
})
.for_each(|ep| { .for_each(|ep| {
ep.set_local_uri(None); ep.set_local_uri(None);
if let Err(err) = ep.save() { if let Err(err) = ep.save() {