aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/script_module.rs
diff options
context:
space:
mode:
authorMartin Robinson <mrobinson@igalia.com>2024-10-10 03:21:07 -0700
committerGitHub <noreply@github.com>2024-10-10 10:21:07 +0000
commit6f87c38cda290a46148102b124a82fe786c0bcbe (patch)
tree5597dd272f4ba2b950e0b48deae0a295ed912e6b /components/script/script_module.rs
parent2805d3ce149fac5786b96d83cdbb2d50583bc75d (diff)
downloadservo-6f87c38cda290a46148102b124a82fe786c0bcbe.tar.gz
servo-6f87c38cda290a46148102b124a82fe786c0bcbe.zip
clippy: Rename various methods and members to conform to naming guidelines (#33762)
This ensure that methods named `new()` do not take `&self` or return `Box<Self>`. In addition, method are renamed (or removed when not necessary) to avoid being prefixed with `from_`. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Diffstat (limited to 'components/script/script_module.rs')
-rw-r--r--components/script/script_module.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/components/script/script_module.rs b/components/script/script_module.rs
index ba0d845cb14..89d9d3f0284 100644
--- a/components/script/script_module.rs
+++ b/components/script/script_module.rs
@@ -347,7 +347,7 @@ impl ModuleTree {
let handler = PromiseNativeHandler::new(
&owner.global(),
- Some(ModuleHandler::new(Box::new(
+ Some(ModuleHandler::new_boxed(Box::new(
task!(fetched_resolve: move || {
this.notify_owner_to_finish(identity, options);
}),
@@ -383,7 +383,7 @@ impl ModuleTree {
let handler = PromiseNativeHandler::new(
&owner.global(),
- Some(ModuleHandler::new(Box::new(
+ Some(ModuleHandler::new_boxed(Box::new(
task!(fetched_resolve: move || {
this.finish_dynamic_module(identity, module_id);
}),
@@ -858,7 +858,7 @@ struct ModuleHandler {
}
impl ModuleHandler {
- pub fn new(task: Box<dyn TaskBox>) -> Box<dyn Callback> {
+ pub fn new_boxed(task: Box<dyn TaskBox>) -> Box<dyn Callback> {
Box::new(Self {
task: DomRefCell::new(Some(task)),
})