mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-22 02:01:55 +07:00
Fix two manual let-else
This commit is contained in:
+1
-4
@@ -1536,13 +1536,10 @@ impl State {
|
|||||||
|
|
||||||
debug!(session_id, "StartCast");
|
debug!(session_id, "StartCast");
|
||||||
|
|
||||||
let gbm = match self.backend.gbm_device() {
|
let Some(gbm) = self.backend.gbm_device() else {
|
||||||
Some(gbm) => gbm,
|
|
||||||
None => {
|
|
||||||
warn!("error starting screencast: no GBM device available");
|
warn!("error starting screencast: no GBM device available");
|
||||||
self.niri.stop_cast(session_id);
|
self.niri.stop_cast(session_id);
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
let pw = if let Some(pw) = &self.niri.pipewire {
|
let pw = if let Some(pw) = &self.niri.pipewire {
|
||||||
|
|||||||
+1
-4
@@ -844,12 +844,9 @@ impl Cast {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut buffer = match self.stream.dequeue_buffer() {
|
let Some(mut buffer) = self.stream.dequeue_buffer() else {
|
||||||
Some(buffer) => buffer,
|
|
||||||
None => {
|
|
||||||
warn!("no available buffer in pw stream, skipping frame");
|
warn!("no available buffer in pw stream, skipping frame");
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
let fd = buffer.datas_mut()[0].as_raw().fd;
|
let fd = buffer.datas_mut()[0].as_raw().fd;
|
||||||
|
|||||||
Reference in New Issue
Block a user