mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Use while let{} instead of loop{match{}}
This commit is contained in:
parent
7ace7bc090
commit
3985e33b43
1 changed files with 3 additions and 8 deletions
|
@ -2125,14 +2125,9 @@ fn find_layer_with_pipeline_and_layer_id_for_layer(layer: Rc<Layer<CompositorDat
|
|||
impl<Window> CompositorEventListener for IOCompositor<Window> where Window: WindowMethods {
|
||||
fn handle_events(&mut self, messages: Vec<WindowEvent>) -> bool {
|
||||
// Check for new messages coming from the other tasks in the system.
|
||||
loop {
|
||||
match self.port.try_recv_compositor_msg() {
|
||||
None => break,
|
||||
Some(msg) => {
|
||||
if !self.handle_browser_message(msg) {
|
||||
break
|
||||
}
|
||||
}
|
||||
while let Some(msg) = self.port.try_recv_compositor_msg() {
|
||||
if !self.handle_browser_message(msg) {
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue