Skip to content

Commit

Permalink
Dont ignore locked mutex in debug impl
Browse files Browse the repository at this point in the history
  • Loading branch information
CosmicHorrorDev committed Nov 1, 2023
1 parent 817a385 commit 6a43266
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/image/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,10 @@ pub struct Image {
}

fn debug_ignore_image_data(mutex: &Mutex<Option<ImageData>>) -> bool {
let data = match mutex.lock() {
Ok(data) => data,
Err(poison_error) => poison_error.into_inner(),
};
data.is_none()
match mutex.lock() {
Ok(data) => data.is_none(),
Err(_) => true,
}
}

impl Image {
Expand Down

0 comments on commit 6a43266

Please sign in to comment.