From 8489b3004221254c83fe2b47d07d7e3d8978aa56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabrice=20Desr=C3=A9?= Date: Thu, 5 May 2016 17:59:13 -0700 Subject: [PATCH] Fix a build warning in compositor.rs --- components/compositing/compositor.rs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/components/compositing/compositor.rs b/components/compositing/compositor.rs index 12e99e6d385..35b6c8133b6 100644 --- a/components/compositing/compositor.rs +++ b/components/compositing/compositor.rs @@ -1350,10 +1350,9 @@ impl IOCompositor { Some(root_pipeline_id) => root_pipeline_id, None => return, }; - let root_pipeline = match self.pipeline(root_pipeline_id) { - Some(root_pipeline) => root_pipeline, - None => return, - }; + if self.pipeline(root_pipeline_id).is_none() { + return; + } let (translated_point, translated_pipeline_id) = webrender_api.translate_point_to_layer_space(&point.to_untyped()); @@ -1395,10 +1394,9 @@ impl IOCompositor { Some(root_pipeline_id) => root_pipeline_id, None => return, }; - let root_pipeline = match self.pipeline(root_pipeline_id) { - Some(root_pipeline) => root_pipeline, - None => return, - }; + if self.pipeline(root_pipeline_id).is_none() { + return; + } let (translated_point, translated_pipeline_id) = webrender_api.translate_point_to_layer_space(&cursor.to_untyped());