EpisodeWidget: Minor style change.

This commit is contained in:
Jordan Petridis 2018-06-05 14:33:18 +03:00
parent 9b0ac5b83d
commit 6d93ceb910
No known key found for this signature in database
GPG Key ID: CEABAD9F5683B9A6

View File

@ -511,11 +511,9 @@ fn progress_bar_helper(
// info!("Fraction: {}", fraction);
// Check if the download is still active
let active = {
let m = manager::ACTIVE_DOWNLOADS
.read()
.map_err(|_| format_err!("Failed to get a lock on the mutex."))?;
m.contains_key(&episode_rowid)
let active = match manager::ACTIVE_DOWNLOADS.read() {
Ok(guard) => guard.contains_key(&episode_rowid),
Err(_) => return Err(format_err!("Failed to get a lock on the mutex.")),
};
if (fraction >= 1.0) && (!fraction.is_nan()) {