util/frame: make it Send

This commit is contained in:
meh 2015-05-21 20:24:48 +02:00
parent 08d1188d2c
commit 41a35bc542

View File

@ -147,6 +147,8 @@ impl Frame {
} }
} }
unsafe impl Send for Frame { }
impl Clone for Frame { impl Clone for Frame {
fn clone(&self) -> Self { fn clone(&self) -> Self {
unsafe { unsafe {
@ -237,6 +239,8 @@ impl Audio {
} }
} }
unsafe impl Send for Audio { }
impl Deref for Audio { impl Deref for Audio {
type Target = Frame; type Target = Frame;
@ -259,14 +263,6 @@ impl Into<Audio> for Frame {
pub struct Video(Frame); pub struct Video(Frame);
impl Deref for Video {
type Target = Frame;
fn deref(&self) -> &Frame {
&self.0
}
}
impl Video { impl Video {
pub fn new() -> Self { pub fn new() -> Self {
Video(Frame::new()) Video(Frame::new())
@ -408,6 +404,16 @@ impl Video {
} }
} }
unsafe impl Send for Video { }
impl Deref for Video {
type Target = Frame;
fn deref(&self) -> &Frame {
&self.0
}
}
impl Into<Video> for Frame { impl Into<Video> for Frame {
fn into(self) -> Video { fn into(self) -> Video {
Video(self) Video(self)