aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom')
-rw-r--r--components/script/dom/xrinputsourcearray.rs2
-rw-r--r--components/script/dom/xrrenderstate.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/components/script/dom/xrinputsourcearray.rs b/components/script/dom/xrinputsourcearray.rs
index be48cbc4052..c2f15361738 100644
--- a/components/script/dom/xrinputsourcearray.rs
+++ b/components/script/dom/xrinputsourcearray.rs
@@ -43,7 +43,7 @@ impl XRInputSourceArray {
// This is quadratic, but won't be a problem for the only case
// where we add multiple input sources (the initial input sources case)
debug_assert!(
- input_sources.iter().find(|i| i.id() == info.id).is_none(),
+ !input_sources.iter().any(|i| i.id() == info.id),
"Should never add a duplicate input id!"
);
let input = XRInputSource::new(&global, session, info.clone());
diff --git a/components/script/dom/xrrenderstate.rs b/components/script/dom/xrrenderstate.rs
index 1deca6f7976..77e579ecf89 100644
--- a/components/script/dom/xrrenderstate.rs
+++ b/components/script/dom/xrrenderstate.rs
@@ -109,7 +109,7 @@ impl XRRenderState {
if let Some(base_layer) = self.base_layer.get() {
match sub_images.len() {
// For inline sessions, there may be a base layer, but it won't have a framebuffer
- 0 => base_layer.layer_id() == None,
+ 0 => base_layer.layer_id().is_none(),
// For immersive sessions, the base layer will have a framebuffer,
// so we make sure the layer id's match up
1 => base_layer.layer_id() == Some(sub_images[0].layer_id),