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:
Oluwatobi Sofela 2024-03-23 12:29:20 +01:00 committed by GitHub
parent 3fc157338e
commit 3c05b58221
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
62 changed files with 157 additions and 168 deletions

View file

@ -150,13 +150,8 @@ impl PaintWorkletGlobalScope {
self.upcast(),
properties.iter().cloned(),
);
let result = self.draw_a_paint_image(
&name,
size,
device_pixel_ratio,
&*map,
&*arguments,
);
let result =
self.draw_a_paint_image(&name, size, device_pixel_ratio, &map, &arguments);
if (result.image_key.is_some()) && (result.missing_image_urls.is_empty()) {
*self.cached_name.borrow_mut() = name;
self.cached_size.set(size);
@ -180,13 +175,8 @@ impl PaintWorkletGlobalScope {
self.upcast(),
properties.iter().cloned(),
);
let result = self.draw_a_paint_image(
&name,
size,
device_pixel_ratio,
&*map,
&*arguments,
);
let result =
self.draw_a_paint_image(&name, size, device_pixel_ratio, &map, &arguments);
if (result.image_key.is_some()) && (result.missing_image_urls.is_empty()) {
*self.cached_name.borrow_mut() = name;
*self.cached_properties.borrow_mut() = properties;
@ -322,7 +312,7 @@ impl PaintWorkletGlobalScope {
.map(|argument| ObjectValue(argument.reflector().get_jsobject().get()))
.collect();
let arguments_value_array =
unsafe { HandleValueArray::from_rooted_slice(&*arguments_value_vec) };
unsafe { HandleValueArray::from_rooted_slice(&arguments_value_vec) };
rooted!(in(*cx) let argument_object = unsafe { NewArrayObject(*cx, &arguments_value_array) });
let args_slice = [
@ -576,7 +566,7 @@ impl PaintWorkletGlobalScopeMethods for PaintWorkletGlobalScope {
paint_function.handle(),
alpha,
input_arguments.len(),
&*context,
&context,
);
// Step 20.