mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Make Runnable::handler take self by value.
With my thanks to kimundi and eddyb for their help in making this approach work.
This commit is contained in:
parent
14ff55443f
commit
b2f40b9873
3 changed files with 8 additions and 6 deletions
|
@ -85,8 +85,9 @@ impl XHRProgressHandler {
|
|||
}
|
||||
|
||||
impl Runnable for XHRProgressHandler {
|
||||
fn handler(&self) {
|
||||
XMLHttpRequest::handle_progress(self.addr.clone(), self.progress.clone());
|
||||
fn handler(self: Box<XHRProgressHandler>) {
|
||||
let this = *self;
|
||||
XMLHttpRequest::handle_progress(this.addr, this.progress);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue