clippy: Fix suggestions in script, libservo, and servoshell (#33453)

* fix clone on copy warning in servoshell

Signed-off-by: Ali Zein Yousuf <azy5030@gmail.com>

* Remove unecessary borrow in libservo

Signed-off-by: Ali Zein Yousuf <azy5030@gmail.com>

* Ignore too many arguments warning on create_constellation()

Signed-off-by: Ali Zein Yousuf <azy5030@gmail.com>

* fix explicit auto-deref warning

Signed-off-by: Ali Zein Yousuf <azy5030@gmail.com>

* Autofix multiple clippy warnings in components/script

Signed-off-by: Ali Zein Yousuf <azy5030@gmail.com>

---------

Signed-off-by: Ali Zein Yousuf <azy5030@gmail.com>
This commit is contained in:
Ali 2024-09-14 03:41:13 -05:00 committed by GitHub
parent 6a3cdc47ec
commit ed6b1b5e6a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 44 additions and 42 deletions

View file

@ -96,7 +96,7 @@ impl GamepadHapticActuator {
}
Self {
reflector_: Reflector::new(),
gamepad_index: gamepad_index.into(),
gamepad_index: gamepad_index,
effects,
playing_effect_promise: DomRefCell::new(None),
sequence_id: Cell::new(0),
@ -118,7 +118,7 @@ impl GamepadHapticActuator {
gamepad_index: u32,
supported_haptic_effects: GamepadSupportedHapticEffects,
) -> DomRoot<GamepadHapticActuator> {
let haptic_actuator = reflect_dom_object_with_proto(
reflect_dom_object_with_proto(
Box::new(GamepadHapticActuator::new_inherited(
gamepad_index,
supported_haptic_effects,
@ -126,8 +126,7 @@ impl GamepadHapticActuator {
global,
None,
CanGc::note(),
);
haptic_actuator
)
}
}
@ -367,7 +366,7 @@ impl GamepadHapticActuator {
return;
}
let this = Trusted::new(&*self);
let this = Trusted::new(self);
let _ = self.global().gamepad_task_source().queue(
task!(stop_playing_effect: move || {
let actuator = this.root();