diff options
author | chickenleaf <lashwinib@gmail.com> | 2024-10-18 19:27:13 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-18 13:57:13 +0000 |
commit | 1ae90dcd95125133a266781828b0bfc47a681bbf (patch) | |
tree | 9082770c56e5f8902f1e463e22603676a5d0f4f4 /components/script/dom | |
parent | af6154cf630bd498f8b5afbd8a321eb4a45463b6 (diff) | |
download | servo-1ae90dcd95125133a266781828b0bfc47a681bbf.tar.gz servo-1ae90dcd95125133a266781828b0bfc47a681bbf.zip |
clippy: Fix a variety of clippy warnings in `fonts`, `layout_2020` and the DOM code (#33894)
* fixed some clippy warnings
Signed-off-by: L Ashwin B <lashwinib@gmail.com>
* Delete extra file
Signed-off-by: chickenleaf <lashwinib@gmail.com>
* preserved newline in compositionevent.rs
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
Signed-off-by: chickenleaf <lashwinib@gmail.com>
* removed the newline in PrototypeList
Signed-off-by: L Ashwin B <lashwinib@gmail.com>
* removed the trailing whitespace
Signed-off-by: L Ashwin B <lashwinib@gmail.com>
---------
Signed-off-by: L Ashwin B <lashwinib@gmail.com>
Signed-off-by: chickenleaf <lashwinib@gmail.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
Diffstat (limited to 'components/script/dom')
-rw-r--r-- | components/script/dom/bindings/codegen/CodegenRust.py | 1 | ||||
-rw-r--r-- | components/script/dom/bindings/refcounted.rs | 1 | ||||
-rw-r--r-- | components/script/dom/closeevent.rs | 1 | ||||
-rw-r--r-- | components/script/dom/compositionevent.rs | 1 |
4 files changed, 4 insertions, 0 deletions
diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py index 6348bc52c33..139bf49e4a7 100644 --- a/components/script/dom/bindings/codegen/CodegenRust.py +++ b/components/script/dom/bindings/codegen/CodegenRust.py @@ -7935,6 +7935,7 @@ class GlobalGenRoots(): CGGeneric(AUTOGENERATED_WARNING_COMMENT), CGGeneric(f"pub const PROTO_OR_IFACE_LENGTH: usize = {len(protos) + len(constructors)};\n"), CGGeneric(f"pub const MAX_PROTO_CHAIN_LENGTH: usize = {config.maxProtoChainLength};\n\n"), + CGGeneric("#[allow(clippy::enum_variant_names)]"), CGNonNamespacedEnum('ID', protos, 0, deriving="PartialEq, Copy, Clone", repr="u16"), CGNonNamespacedEnum('Constructor', constructors, len(protos), deriving="PartialEq, Copy, Clone", repr="u16"), diff --git a/components/script/dom/bindings/refcounted.rs b/components/script/dom/bindings/refcounted.rs index 784e71ff3aa..4b43f518e2f 100644 --- a/components/script/dom/bindings/refcounted.rs +++ b/components/script/dom/bindings/refcounted.rs @@ -253,6 +253,7 @@ impl LiveDOMReferences { /// ptr must be a pointer to a type that implements DOMObject. /// This is not enforced by the type system to reduce duplicated generic code, /// which is acceptable since this method is internal to this module. + #[allow(clippy::arc_with_non_send_sync)] unsafe fn addref(&self, ptr: *const libc::c_void) -> Arc<TrustedReference> { let mut table = self.reflectable_table.borrow_mut(); let capacity = table.capacity(); diff --git a/components/script/dom/closeevent.rs b/components/script/dom/closeevent.rs index 381b7c853f0..6fc7fdcb2c6 100644 --- a/components/script/dom/closeevent.rs +++ b/components/script/dom/closeevent.rs @@ -37,6 +37,7 @@ impl CloseEvent { } } + #[allow(clippy::too_many_arguments)] pub fn new( global: &GlobalScope, type_: Atom, diff --git a/components/script/dom/compositionevent.rs b/components/script/dom/compositionevent.rs index ef9b914fb12..6d602acead7 100644 --- a/components/script/dom/compositionevent.rs +++ b/components/script/dom/compositionevent.rs @@ -35,6 +35,7 @@ impl CompositionEvent { reflect_dom_object(Box::new(CompositionEvent::new_inherited()), window) } + #[allow(clippy::too_many_arguments)] pub fn new( window: &Window, type_: DOMString, |