mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
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>
This commit is contained in:
parent
2805d3ce14
commit
6f87c38cda
6 changed files with 55 additions and 57 deletions
|
@ -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)),
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue