Constraint the use of ChannelCell to just channels
This commit is contained in:
parent
ae62948d6c
commit
3fdf61c819
@ -60,7 +60,10 @@ pub struct ChannelCell<T: ?Sized> {
|
|||||||
|
|
||||||
impl<T> ChannelCell<T> {
|
impl<T> ChannelCell<T> {
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
pub const fn new(value: T) -> ChannelCell<T> {
|
pub const fn new<U>(value: T) -> ChannelCell<T>
|
||||||
|
where
|
||||||
|
T: ChannelLike<U>,
|
||||||
|
{
|
||||||
ChannelCell { _value: value }
|
ChannelCell { _value: value }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user