Auto merge of #11571 - Ms2ger:derive-clone, r=nox

Derive Clone for DOMManipulationTaskSource, UserInteractionTaskSource.

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11571)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-06-03 10:40:07 -05:00
commit e75339ca0c
2 changed files with 2 additions and 10 deletions

View file

@ -11,7 +11,7 @@ use std::sync::mpsc::Sender;
use string_cache::Atom;
use task_source::TaskSource;
#[derive(JSTraceable)]
#[derive(JSTraceable, Clone)]
pub struct DOMManipulationTaskSource(pub Sender<MainThreadScriptMsg>);
impl TaskSource<DOMManipulationTask> for DOMManipulationTaskSource {
@ -36,10 +36,6 @@ impl DOMManipulationTaskSource {
let _ = self.0.send(MainThreadScriptMsg::DOMManipulation(DOMManipulationTask::FireSimpleEvent(
target, name)));
}
pub fn clone(&self) -> DOMManipulationTaskSource {
DOMManipulationTaskSource((&self.0).clone())
}
}
pub enum DOMManipulationTask {

View file

@ -11,7 +11,7 @@ use std::sync::mpsc::Sender;
use string_cache::Atom;
use task_source::TaskSource;
#[derive(JSTraceable)]
#[derive(JSTraceable, Clone)]
pub struct UserInteractionTaskSource(pub Sender<MainThreadScriptMsg>);
impl TaskSource<UserInteractionTask> for UserInteractionTaskSource {
@ -30,10 +30,6 @@ impl UserInteractionTaskSource {
let _ = self.0.send(MainThreadScriptMsg::UserInteraction(UserInteractionTask::FireEvent(
target, name, bubbles, cancelable)));
}
pub fn clone(&self) -> UserInteractionTaskSource {
UserInteractionTaskSource((&self.0).clone())
}
}
pub enum UserInteractionTask {