Fixed some clippy warnings in components/script/dom (#33757)

* Fixed some clippy warnings in components/script/dom

Signed-off-by: jahielkomu <ktumuhairwe24@gmail.com>

* Incorporated review suggestions

Signed-off-by: jahielkomu <ktumuhairwe24@gmail.com>

---------

Signed-off-by: jahielkomu <ktumuhairwe24@gmail.com>
This commit is contained in:
komuhangi 2024-10-10 07:05:46 +03:00 committed by GitHub
parent 9a8e7f4867
commit 0c4720140f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 0 deletions

View file

@ -18,6 +18,7 @@ use crate::dom::globalscope::GlobalScope;
use crate::script_runtime::CanGc;
#[repr(u16)]
#[allow(clippy::enum_variant_names)]
#[derive(Clone, Copy, Debug, Eq, JSTraceable, MallocSizeOf, Ord, PartialEq, PartialOrd)]
pub enum DOMErrorName {
IndexSizeError = DOMExceptionConstants::INDEX_SIZE_ERR,

View file

@ -58,6 +58,7 @@ use crate::realms::{enter_realm, InRealm};
use crate::script_runtime::CanGc;
#[derive(Clone, JSTraceable, MallocSizeOf, PartialEq)]
#[allow(clippy::enum_variant_names)]
pub enum CommonEventHandler {
EventHandler(#[ignore_malloc_size_of = "Rc"] Rc<EventHandlerNonNull>),