aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/worklet.rs
diff options
context:
space:
mode:
authorRosemary Ajayi <okhuomonajayi54@gmail.com>2024-03-18 10:05:18 +0000
committerGitHub <noreply@github.com>2024-03-18 10:05:18 +0000
commit3ac0ab2e4e711a3097d50c699f3572091fa03fd2 (patch)
treefeee6ed79728bc2a2b7ddb3505d7a27e9f0f782d /components/script/dom/worklet.rs
parent4bca55e27ad38685067986c8f478bae1b214b43c (diff)
downloadservo-3ac0ab2e4e711a3097d50c699f3572091fa03fd2.tar.gz
servo-3ac0ab2e4e711a3097d50c699f3572091fa03fd2.zip
clippy: Fix some warnings in the `script` crate (#31719)
* Fix InlineFormatting error * BoxFrament * fix clippy error * clippy:fix clipy errors * fix clippy errors * fix clippy errors * fix clippy errors * Remove changes to `layout_2020` --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
Diffstat (limited to 'components/script/dom/worklet.rs')
-rw-r--r--components/script/dom/worklet.rs30
1 files changed, 15 insertions, 15 deletions
diff --git a/components/script/dom/worklet.rs b/components/script/dom/worklet.rs
index 2a59cbad5c1..90b9747ab36 100644
--- a/components/script/dom/worklet.rs
+++ b/components/script/dom/worklet.rs
@@ -90,7 +90,7 @@ impl Worklet {
Worklet {
reflector: Reflector::new(),
window: Dom::from_ref(window),
- global_type: global_type,
+ global_type,
droppable_field: DroppableField {
worklet_id: WorkletId::new(),
thread_pool: OnceCell::new(),
@@ -285,12 +285,12 @@ impl WorkletThreadPool {
primary_sender: primary_sender.clone(),
hot_backup_sender: hot_backup_sender.clone(),
cold_backup_sender: cold_backup_sender.clone(),
- global_init: global_init,
+ global_init,
};
WorkletThreadPool {
- primary_sender: primary_sender,
- hot_backup_sender: hot_backup_sender,
- cold_backup_sender: cold_backup_sender,
+ primary_sender,
+ hot_backup_sender,
+ cold_backup_sender,
control_sender_0: WorkletThread::spawn(primary_role, init.clone(), 0),
control_sender_1: WorkletThread::spawn(hot_backup_role, init.clone(), 1),
control_sender_2: WorkletThread::spawn(cold_backup_role, init, 2),
@@ -320,13 +320,13 @@ impl WorkletThreadPool {
&self.control_sender_2,
] {
let _ = sender.send(WorkletControl::FetchAndInvokeAWorkletScript {
- pipeline_id: pipeline_id,
- worklet_id: worklet_id,
- global_type: global_type,
+ pipeline_id,
+ worklet_id,
+ global_type,
origin: origin.clone(),
base_url: base_url.clone(),
script_url: script_url.clone(),
- credentials: credentials,
+ credentials,
pending_tasks_struct: pending_tasks_struct.clone(),
promise: TrustedPromise::new(promise.clone()),
});
@@ -405,8 +405,8 @@ impl WorkletThreadRole {
WorkletThreadRole {
sender: sender,
receiver: receiver,
- is_hot_backup: is_hot_backup,
- is_cold_backup: is_cold_backup,
+ is_hot_backup,
+ is_cold_backup,
}
}
}
@@ -481,8 +481,8 @@ impl WorkletThread {
let roots = RootCollection::new();
let _stack_roots = ThreadLocalStackRoots::new(&roots);
let mut thread = RootedTraceableBox::new(WorkletThread {
- role: role,
- control_receiver: control_receiver,
+ role,
+ control_receiver,
primary_sender: init.primary_sender,
hot_backup_sender: init.hot_backup_sender,
cold_backup_sender: init.cold_backup_sender,
@@ -767,8 +767,8 @@ pub struct WorkletExecutor {
impl WorkletExecutor {
fn new(worklet_id: WorkletId, primary_sender: Sender<WorkletData>) -> WorkletExecutor {
WorkletExecutor {
- worklet_id: worklet_id,
- primary_sender: primary_sender,
+ worklet_id,
+ primary_sender,
}
}