use a more generic blanket impl
This commit is contained in:
parent
77862868d5
commit
bd1927c5c2
@ -360,17 +360,17 @@ impl<TYPE: Debug + Copy + Clone + PartialEq + Eq + ToBeBytes + Into<u64>> EcssEn
|
||||
{
|
||||
}
|
||||
|
||||
impl<T: Copy + Into<u64>> From<T> for GenericEcssEnumWrapper<T> {
|
||||
fn from(value: T) -> Self {
|
||||
Self::new(value)
|
||||
}
|
||||
}
|
||||
|
||||
macro_rules! generic_ecss_enum_typedefs_and_from_impls {
|
||||
($($ty:ty => $Enum:ident),*) => {
|
||||
$(
|
||||
pub type $Enum = GenericEcssEnumWrapper<$ty>;
|
||||
|
||||
impl From<$ty> for $Enum {
|
||||
fn from(value: $ty) -> Self {
|
||||
Self::new(value)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<$Enum> for $ty {
|
||||
fn from(value: $Enum) -> Self {
|
||||
value.value_typed()
|
||||
|
Loading…
Reference in New Issue
Block a user