mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
use self.0 instead of destructing single item tuple structs
This commit is contained in:
parent
68a8085a2f
commit
418842faf9
17 changed files with 38 additions and 58 deletions
|
@ -16,12 +16,11 @@ pub struct DOMManipulationTaskSource(pub Sender<MainThreadScriptMsg>);
|
|||
|
||||
impl TaskSource<DOMManipulationTask> for DOMManipulationTaskSource {
|
||||
fn queue(&self, msg: DOMManipulationTask) -> Result<(), ()> {
|
||||
let DOMManipulationTaskSource(ref chan) = *self;
|
||||
chan.send(MainThreadScriptMsg::DOMManipulation(msg)).map_err(|_| ())
|
||||
self.0.send(MainThreadScriptMsg::DOMManipulation(msg)).map_err(|_| ())
|
||||
}
|
||||
|
||||
fn clone(&self) -> Box<TaskSource<DOMManipulationTask> + Send> {
|
||||
let DOMManipulationTaskSource(ref chan) = *self;
|
||||
let ref chan = self.0;
|
||||
box DOMManipulationTaskSource((*chan).clone())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue