mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Derive Clone for DOMManipulationTaskSource, UserInteractionTaskSource.
This commit is contained in:
parent
fd03e02291
commit
0861b701d5
2 changed files with 2 additions and 10 deletions
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue