clippy:fix various clippy problems in components/scripts (#31907)

* manual implementation of an assign operation

* manual implementation of an assign operation

* single-character string

* manual cjheck for common ascii range
This commit is contained in:
Rosemary Ajayi 2024-03-27 22:14:41 +00:00 committed by GitHub
parent 1c8c287f01
commit 072b892706
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 14 additions and 14 deletions

View file

@ -90,7 +90,7 @@ fn stringify_handle_value(message: HandleValue) -> DOMString {
) -> DOMString {
rooted!(in(cx) let mut obj = value.to_object());
let mut object_class = ESClass::Other;
if !GetBuiltinClass(cx, obj.handle().into(), &mut object_class as *mut _) {
if !GetBuiltinClass(cx, obj.handle(), &mut object_class as *mut _) {
return DOMString::from("/* invalid */");
}
let mut ids = IdVector::new(cx);
@ -120,9 +120,9 @@ fn stringify_handle_value(message: HandleValue) -> DOMString {
let mut is_none = false;
if !JS_GetOwnPropertyDescriptorById(
cx,
obj.handle().into(),
id.handle().into(),
desc.handle_mut().into(),
obj.handle(),
id.handle(),
desc.handle_mut(),
&mut is_none,
) {
return DOMString::from("/* invalid */");
@ -191,7 +191,7 @@ fn stringify_handle_value(message: HandleValue) -> DOMString {
parents.push(value_bits);
stringify_object_from_handle_value(cx, value, parents)
}
stringify_inner(cx, message.into(), Vec::new())
stringify_inner(cx, message, Vec::new())
}
}