We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4739634 commit 9465e00Copy full SHA for 9465e00
src/platform/linux.rs
@@ -90,7 +90,7 @@ impl LinuxCamera {
90
let camera_frame = camera_frame.with_format(frame.format().to_string());
91
92
// Call callback if set
93
- if let Some(ref cb) = *self.callback.lock() {
+ if let Some(ref cb) = *self.callback.lock().unwrap() {
94
cb(camera_frame.clone());
95
}
96
@@ -206,7 +206,7 @@ impl LinuxCamera {
206
where
207
F: Fn(CameraFrame) + Send + 'static,
208
{
209
- *self.callback.lock() = Some(Box::new(callback));
+ *self.callback.lock().unwrap() = Some(Box::new(callback));
210
Ok(())
211
212
0 commit comments