mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
cargo fix --edition-idioms
This commit is contained in:
parent
b1fd6237d1
commit
2012be4a8b
203 changed files with 665 additions and 1281 deletions
|
@ -26,8 +26,8 @@ pub struct PromiseNativeHandler {
|
|||
impl PromiseNativeHandler {
|
||||
pub fn new(
|
||||
global: &GlobalScope,
|
||||
resolve: Option<Box<Callback>>,
|
||||
reject: Option<Box<Callback>>,
|
||||
resolve: Option<Box<dyn Callback>>,
|
||||
reject: Option<Box<dyn Callback>>,
|
||||
) -> DomRoot<PromiseNativeHandler> {
|
||||
reflect_dom_object(
|
||||
Box::new(PromiseNativeHandler {
|
||||
|
@ -40,7 +40,7 @@ impl PromiseNativeHandler {
|
|||
)
|
||||
}
|
||||
|
||||
fn callback(callback: &Option<Box<Callback>>, cx: *mut JSContext, v: HandleValue) {
|
||||
fn callback(callback: &Option<Box<dyn Callback>>, cx: *mut JSContext, v: HandleValue) {
|
||||
if let Some(ref callback) = *callback {
|
||||
callback.callback(cx, v)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue