clippy: Fix search_is_some warnings (#31971)

This commit is contained in:
Oluwatobi Sofela 2024-04-02 05:01:52 +01:00 committed by GitHub
parent 71f4c5c916
commit da3991c8f3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 6 additions and 12 deletions

View file

@ -779,13 +779,12 @@ impl XRSessionMethods for XRSession {
(!self.is_immersive() || ty != XRReferenceSpaceType::Local)
{
let s = ty.as_str();
if self
if !self
.session
.borrow()
.granted_features()
.iter()
.find(|f| **f == s)
.is_none()
.any(|f| *f == s)
{
p.reject_error(Error::NotSupported);
return p;
@ -833,13 +832,12 @@ impl XRSessionMethods for XRSession {
fn RequestHitTestSource(&self, options: &XRHitTestOptionsInit) -> Rc<Promise> {
let p = Promise::new(&self.global());
if self
if !self
.session
.borrow()
.granted_features()
.iter()
.find(|f| &**f == "hit-test")
.is_none()
.any(|f| &*f == "hit-test")
{
p.reject_error(Error::NotSupported);
return p;