mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
clippy: Fix explicit_auto_deref
warnings in components/script
(#31837)
* clippy: Fix explicit auto-deref warnings * clippy: Fix explicit auto-deref warnings * refactor: Tidy up code * refactor: Fix method not found errors
This commit is contained in:
parent
3fc157338e
commit
3c05b58221
62 changed files with 157 additions and 168 deletions
|
@ -156,12 +156,12 @@ unsafe fn html_constructor(
|
|||
// Any prototype used to create these elements will be overwritten before returning
|
||||
// from this function, so we don't bother overwriting the defaults here.
|
||||
let element = if definition.is_autonomous() {
|
||||
DomRoot::upcast(HTMLElement::new(name.local, None, &*document, None))
|
||||
DomRoot::upcast(HTMLElement::new(name.local, None, &document, None))
|
||||
} else {
|
||||
create_native_html_element(
|
||||
name,
|
||||
None,
|
||||
&*document,
|
||||
&document,
|
||||
ElementCreator::ScriptCreated,
|
||||
None,
|
||||
)
|
||||
|
@ -176,7 +176,7 @@ unsafe fn html_constructor(
|
|||
element.set_custom_element_definition(definition.clone());
|
||||
|
||||
// Step 8.5
|
||||
if !check_type(&*element) {
|
||||
if !check_type(&element) {
|
||||
throw_dom_exception(cx, global, Error::InvalidState);
|
||||
return Err(());
|
||||
} else {
|
||||
|
@ -193,7 +193,7 @@ unsafe fn html_constructor(
|
|||
construction_stack.push(ConstructionStackEntry::AlreadyConstructedMarker);
|
||||
|
||||
// Step 13
|
||||
if !check_type(&*element) {
|
||||
if !check_type(&element) {
|
||||
throw_dom_exception(cx, global, Error::InvalidState);
|
||||
return Err(());
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue