mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +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
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue