aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-05-06 08:10:23 -0700
committerbors-servo <lbergstrom+bors@mozilla.com>2016-05-06 08:10:23 -0700
commit29ed65016047ee10dabf18894ba00ece6227e865 (patch)
tree88c2d57ce939ea3ac56782bd6125c4d31206c1db
parentd7fa1d8eeda0fa5c3007fa81e97a2f9a631c3eb4 (diff)
parent8489b3004221254c83fe2b47d07d7e3d8978aa56 (diff)
downloadservo-29ed65016047ee10dabf18894ba00ece6227e865.tar.gz
servo-29ed65016047ee10dabf18894ba00ece6227e865.zip
Auto merge of #11042 - fabricedesre:compositing-warning, r=metajack
Fix a build warning in compositor.rs Stops the compiler complaining about `root_pipeline` being an unused variable. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11042) <!-- Reviewable:end -->
-rw-r--r--components/compositing/compositor.rs14
1 files 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<Window: WindowMethods> IOCompositor<Window> {
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<Window: WindowMethods> IOCompositor<Window> {
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());