fix many clippy warnings (#33510)

Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
This commit is contained in:
Gae24 2024-09-21 15:58:31 +02:00 committed by GitHub
parent 4e4b137eaa
commit f986160ed4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 29 additions and 34 deletions

View file

@ -114,11 +114,9 @@ impl XRReferenceSpaceEventMethods for XRReferenceSpaceEvent {
/// <https://www.w3.org/TR/webxr/#dom-xrreferencespaceevent-transform>
fn GetTransform(&self) -> Option<DomRoot<XRRigidTransform>> {
if let Some(ref transform) = self.transform {
Some(DomRoot::from_ref(&**transform))
} else {
None
}
self.transform
.as_ref()
.map(|transform| DomRoot::from_ref(&**transform))
}
/// <https://dom.spec.whatwg.org/#dom-event-istrusted>