diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-06-03 10:40:07 -0500 |
---|---|---|
committer | bors-servo <lbergstrom+bors@mozilla.com> | 2016-06-03 10:40:07 -0500 |
commit | e75339ca0c5f5aea68be8ef08a28e77e70bd59a8 (patch) | |
tree | a08b5fac2a31d6affea43e8f79386da7861c2b6e | |
parent | 1f5b0008ac763bbb2209a70afddb6434d18cff9d (diff) | |
parent | 0861b701d541595daad045317ae21e4174a6613e (diff) | |
download | servo-e75339ca0c5f5aea68be8ef08a28e77e70bd59a8.tar.gz servo-e75339ca0c5f5aea68be8ef08a28e77e70bd59a8.zip |
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 -->
-rw-r--r-- | components/script/task_source/dom_manipulation.rs | 6 | ||||
-rw-r--r-- | components/script/task_source/user_interaction.rs | 6 |
2 files changed, 2 insertions, 10 deletions
diff --git a/components/script/task_source/dom_manipulation.rs b/components/script/task_source/dom_manipulation.rs index 67cac79c48c..daf212d8c52 100644 --- a/components/script/task_source/dom_manipulation.rs +++ b/components/script/task_source/dom_manipulation.rs @@ -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 { diff --git a/components/script/task_source/user_interaction.rs b/components/script/task_source/user_interaction.rs index 8422501cc83..24dd59af222 100644 --- a/components/script/task_source/user_interaction.rs +++ b/components/script/task_source/user_interaction.rs @@ -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 { |