diff options
Diffstat (limited to 'components/script/task_source/user_interaction.rs')
-rw-r--r-- | components/script/task_source/user_interaction.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/components/script/task_source/user_interaction.rs b/components/script/task_source/user_interaction.rs index 7912eac720d..a4a2549e63d 100644 --- a/components/script/task_source/user_interaction.rs +++ b/components/script/task_source/user_interaction.rs @@ -10,12 +10,11 @@ pub struct UserInteractionTaskSource(pub Sender<MainThreadScriptMsg>); impl ScriptChan for UserInteractionTaskSource { fn send(&self, msg: CommonScriptMsg) -> Result<(), ()> { - let UserInteractionTaskSource(ref chan) = *self; - chan.send(MainThreadScriptMsg::Common(msg)).map_err(|_| ()) + self.0.send(MainThreadScriptMsg::Common(msg)).map_err(|_| ()) } fn clone(&self) -> Box<ScriptChan + Send> { - let UserInteractionTaskSource(ref chan) = *self; + let ref chan = self.0; box UserInteractionTaskSource((*chan).clone()) } } |