Tighten sender/receiver bounds
This commit is contained in:
parent
d86892ca56
commit
babee7f32a
@ -65,8 +65,10 @@ where
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Safe to pass the sender around
|
// Safe to pass the sender around
|
||||||
unsafe impl<'ch, M, T, const N: usize> Send for Sender<'ch, M, T, N> where M: Mutex<Data = ()> {}
|
unsafe impl<'ch, M, T, const N: usize> Send for Sender<'ch, M, T, N> where M: Mutex<Data = ()> + Sync
|
||||||
unsafe impl<'ch, M, T, const N: usize> Sync for Sender<'ch, M, T, N> where M: Mutex<Data = ()> {}
|
{}
|
||||||
|
unsafe impl<'ch, M, T, const N: usize> Sync for Sender<'ch, M, T, N> where M: Mutex<Data = ()> + Sync
|
||||||
|
{}
|
||||||
|
|
||||||
/// Receive values from the associated `Sender`.
|
/// Receive values from the associated `Sender`.
|
||||||
///
|
///
|
||||||
@ -79,8 +81,14 @@ where
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Safe to pass the receiver around
|
// Safe to pass the receiver around
|
||||||
unsafe impl<'ch, M, T, const N: usize> Send for Receiver<'ch, M, T, N> where M: Mutex<Data = ()> {}
|
unsafe impl<'ch, M, T, const N: usize> Send for Receiver<'ch, M, T, N> where
|
||||||
unsafe impl<'ch, M, T, const N: usize> Sync for Receiver<'ch, M, T, N> where M: Mutex<Data = ()> {}
|
M: Mutex<Data = ()> + Sync
|
||||||
|
{
|
||||||
|
}
|
||||||
|
unsafe impl<'ch, M, T, const N: usize> Sync for Receiver<'ch, M, T, N> where
|
||||||
|
M: Mutex<Data = ()> + Sync
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
/// Splits a bounded mpsc channel into a `Sender` and `Receiver`.
|
/// Splits a bounded mpsc channel into a `Sender` and `Receiver`.
|
||||||
///
|
///
|
||||||
|
Loading…
Reference in New Issue
Block a user