mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-02 06:40:22 +01:00
rusticl/queue: use let else statement when receiving new events
Gets rid of an unwrap() call. Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35672>
This commit is contained in:
parent
513a7ca417
commit
4254e13300
1 changed files with 3 additions and 4 deletions
|
|
@ -341,12 +341,11 @@ impl Queue {
|
|||
let mut last_err = CL_SUCCESS as cl_int;
|
||||
let ctx = ctx.ctx();
|
||||
loop {
|
||||
let r = rx_t.recv();
|
||||
if r.is_err() {
|
||||
let Ok(new_events) = rx_t.recv() else {
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
let new_events = QueueEvents::new(r.unwrap());
|
||||
let new_events = QueueEvents::new(new_events);
|
||||
let mut flushed = Vec::new();
|
||||
|
||||
for e in new_events {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue