clippy: Fix warnings in components/script/dom (#33860)

* clippy: Fix warnings in components/script/dom

Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>

* Move allow to WRAP level

Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>

---------

Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
This commit is contained in:
tanishka 2024-10-16 21:18:53 +05:30 committed by GitHub
parent a646c850c6
commit cde6931f4b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 0 deletions

View file

@ -143,6 +143,7 @@ impl MutDomObject for Reflector {
/// A trait to provide a function pointer to wrap function for DOM objects.
pub trait DomObjectWrap: Sized + DomObject {
/// Function pointer to the general wrap function type
#[allow(clippy::type_complexity)]
const WRAP: unsafe fn(
JSContext,
&GlobalScope,
@ -156,6 +157,7 @@ pub trait DomObjectWrap: Sized + DomObject {
/// DOM iterator interfaces.
pub trait DomObjectIteratorWrap: DomObjectWrap + JSTraceable + Iterable {
/// Function pointer to the wrap function for `IterableIterator<T>`
#[allow(clippy::type_complexity)]
const ITER_WRAP: unsafe fn(
JSContext,
&GlobalScope,

View file

@ -46,6 +46,7 @@ impl XRInputSourcesChangeEvent {
}
}
#[allow(clippy::too_many_arguments)]
pub fn new(
global: &GlobalScope,
type_: Atom,