diff options
| author | huntc <[email protected]> | 2021-07-08 11:09:02 +1000 |
|---|---|---|
| committer | huntc <[email protected]> | 2021-07-15 12:31:52 +1000 |
| commit | 3fdf61c819d4612c721d846faf9821170f5f75a3 (patch) | |
| tree | 4605fd223750b0791dc19a2922c951c5ff697d7f | |
| parent | ae62948d6c21bc1ac4af50c3e39888c52d696b24 (diff) | |
Constraint the use of ChannelCell to just channels
| -rw-r--r-- | embassy/src/util/mpsc.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/embassy/src/util/mpsc.rs b/embassy/src/util/mpsc.rs index aabced416..354c3e95c 100644 --- a/embassy/src/util/mpsc.rs +++ b/embassy/src/util/mpsc.rs | |||
| @@ -60,7 +60,10 @@ pub struct ChannelCell<T: ?Sized> { | |||
| 60 | 60 | ||
| 61 | impl<T> ChannelCell<T> { | 61 | impl<T> ChannelCell<T> { |
| 62 | #[inline(always)] | 62 | #[inline(always)] |
| 63 | pub const fn new(value: T) -> ChannelCell<T> { | 63 | pub const fn new<U>(value: T) -> ChannelCell<T> |
| 64 | where | ||
| 65 | T: ChannelLike<U>, | ||
| 66 | { | ||
| 64 | ChannelCell { _value: value } | 67 | ChannelCell { _value: value } |
| 65 | } | 68 | } |
| 66 | } | 69 | } |
