diff options
author | faineance <faineance@users.noreply.github.com> | 2016-03-27 11:50:08 +0100 |
---|---|---|
committer | faineance <faineance@users.noreply.github.com> | 2016-03-27 11:50:08 +0100 |
commit | 418842faf9135da4b70b12fd8b88bc6b8d504cfc (patch) | |
tree | 64690189fcf218696759273c2c29cc2799db8e25 /components/script/task_source/networking.rs | |
parent | 68a8085a2f11d052948145980a0bf8a46471e3a7 (diff) | |
download | servo-418842faf9135da4b70b12fd8b88bc6b8d504cfc.tar.gz servo-418842faf9135da4b70b12fd8b88bc6b8d504cfc.zip |
use self.0 instead of destructing single item tuple structs
Diffstat (limited to 'components/script/task_source/networking.rs')
-rw-r--r-- | components/script/task_source/networking.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/components/script/task_source/networking.rs b/components/script/task_source/networking.rs index 8ebeecdb965..29a5997475e 100644 --- a/components/script/task_source/networking.rs +++ b/components/script/task_source/networking.rs @@ -10,12 +10,11 @@ pub struct NetworkingTaskSource(pub Sender<MainThreadScriptMsg>); impl ScriptChan for NetworkingTaskSource { fn send(&self, msg: CommonScriptMsg) -> Result<(), ()> { - let NetworkingTaskSource(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 NetworkingTaskSource(ref chan) = *self; + let ref chan = self.0; box NetworkingTaskSource((*chan).clone()) } } |