Require Send+'static for Buffer::from_*slice()

This commit is contained in:
Sebastian Dröge 2017-10-26 14:02:36 +02:00
parent f08f0f6f15
commit a1a841afc8

View file

@ -69,7 +69,7 @@ impl GstRc<BufferRef> {
drop(slice);
}
pub fn from_mut_slice<T: AsMut<[u8]>>(slice: T) -> Option<Self> {
pub fn from_mut_slice<T: AsMut<[u8]> + Send + 'static>(slice: T) -> Option<Self> {
assert_initialized_main_thread!();
let raw = unsafe {
@ -97,7 +97,7 @@ impl GstRc<BufferRef> {
}
}
pub fn from_slice<T: AsRef<[u8]>>(slice: T) -> Option<Self> {
pub fn from_slice<T: AsRef<[u8]> + Send + 'static>(slice: T) -> Option<Self> {
assert_initialized_main_thread!();
let raw = unsafe {