Skip to content

Commit 9465e00

Browse files
fix: add .unwrap() to Mutex::lock() calls in linux.rs
1 parent 4739634 commit 9465e00

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/platform/linux.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ impl LinuxCamera {
9090
let camera_frame = camera_frame.with_format(frame.format().to_string());
9191

9292
// Call callback if set
93-
if let Some(ref cb) = *self.callback.lock() {
93+
if let Some(ref cb) = *self.callback.lock().unwrap() {
9494
cb(camera_frame.clone());
9595
}
9696

@@ -206,7 +206,7 @@ impl LinuxCamera {
206206
where
207207
F: Fn(CameraFrame) + Send + 'static,
208208
{
209-
*self.callback.lock() = Some(Box::new(callback));
209+
*self.callback.lock().unwrap() = Some(Box::new(callback));
210210
Ok(())
211211
}
212212
}

0 commit comments

Comments
 (0)