aboutsummaryrefslogtreecommitdiffstats
path: root/components/canvas_traits/webgl_channel/mod.rs
diff options
context:
space:
mode:
authorAnthony Ramine <n.oxyde@gmail.com>2018-09-07 11:10:30 +0200
committerAnthony Ramine <n.oxyde@gmail.com>2018-09-07 11:28:45 +0200
commite37856a855185c496013bdb0009fb0a807396d25 (patch)
treee5fd72866e439895ef9ff4351f6f234b34105543 /components/canvas_traits/webgl_channel/mod.rs
parent1293692ef8874f4d810f9a08114bcbfe11d4ac8f (diff)
downloadservo-e37856a855185c496013bdb0009fb0a807396d25.tar.gz
servo-e37856a855185c496013bdb0009fb0a807396d25.zip
Remove Clone impl for WebGLMsg
Diffstat (limited to 'components/canvas_traits/webgl_channel/mod.rs')
-rw-r--r--components/canvas_traits/webgl_channel/mod.rs14
1 files changed, 13 insertions, 1 deletions
diff --git a/components/canvas_traits/webgl_channel/mod.rs b/components/canvas_traits/webgl_channel/mod.rs
index f317d116f3d..3c6bd1690b0 100644
--- a/components/canvas_traits/webgl_channel/mod.rs
+++ b/components/canvas_traits/webgl_channel/mod.rs
@@ -16,12 +16,24 @@ lazy_static! {
static ref IS_MULTIPROCESS: bool = { opts::multiprocess() };
}
-#[derive(Clone, Deserialize, Serialize)]
+#[derive(Deserialize, Serialize)]
pub enum WebGLSender<T: Serialize> {
Ipc(ipc::WebGLSender<T>),
Mpsc(mpsc::WebGLSender<T>),
}
+impl<T> Clone for WebGLSender<T>
+where
+ T: Serialize,
+{
+ fn clone(&self) -> Self {
+ match *self {
+ WebGLSender::Ipc(ref chan) => WebGLSender::Ipc(chan.clone()),
+ WebGLSender::Mpsc(ref chan) => WebGLSender::Mpsc(chan.clone()),
+ }
+ }
+}
+
impl<T: Serialize> fmt::Debug for WebGLSender<T> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "WebGLSender(..)")