mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +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
|
@ -1017,8 +1017,8 @@ impl TestBindingMethods for TestBinding {
|
|||
let global = self.global();
|
||||
let handler = PromiseNativeHandler::new(
|
||||
&global,
|
||||
resolve.map(SimpleHandler::new),
|
||||
reject.map(SimpleHandler::new),
|
||||
resolve.map(SimpleHandler::new_boxed),
|
||||
reject.map(SimpleHandler::new_boxed),
|
||||
);
|
||||
let p = Promise::new_in_current_realm(comp);
|
||||
p.append_native_handler(&handler, comp);
|
||||
|
@ -1030,7 +1030,7 @@ impl TestBindingMethods for TestBinding {
|
|||
handler: Rc<SimpleCallback>,
|
||||
}
|
||||
impl SimpleHandler {
|
||||
fn new(callback: Rc<SimpleCallback>) -> Box<dyn Callback> {
|
||||
fn new_boxed(callback: Rc<SimpleCallback>) -> Box<dyn Callback> {
|
||||
Box::new(SimpleHandler { handler: callback })
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue