mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-18 07:17:49 +00:00
Update to crossbeam-queue v0.3.11
This commit is contained in:
@@ -51,17 +51,17 @@ impl Stream for ScancodeStream {
|
||||
.expect("scancode queue not initialized");
|
||||
|
||||
// fast path
|
||||
if let Ok(scancode) = queue.pop() {
|
||||
if let Some(scancode) = queue.pop() {
|
||||
return Poll::Ready(Some(scancode));
|
||||
}
|
||||
|
||||
WAKER.register(&cx.waker());
|
||||
match queue.pop() {
|
||||
Ok(scancode) => {
|
||||
Some(scancode) => {
|
||||
WAKER.take();
|
||||
Poll::Ready(Some(scancode))
|
||||
}
|
||||
Err(crossbeam_queue::PopError) => Poll::Pending,
|
||||
None => Poll::Pending,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user