Skip to content

Commit

Permalink
fixup! dedupe basic API types from modality-mutator-protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
azdle committed Aug 30, 2023
1 parent cabc329 commit 76012d5
Showing 1 changed file with 3 additions and 21 deletions.
24 changes: 3 additions & 21 deletions client-libraries/rust/modality-api/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -455,24 +455,6 @@ impl From<&String> for AttrVal {
}
}

impl From<i64> for AttrVal {
fn from(i: i64) -> AttrVal {
AttrVal::Integer(i)
}
}

impl From<i128> for AttrVal {
fn from(i: i128) -> AttrVal {
BigInt::new_attr_val(i)
}
}

impl From<f64> for AttrVal {
fn from(f: f64) -> AttrVal {
AttrVal::Float(f.into())
}
}

impl From<bool> for AttrVal {
fn from(b: bool) -> AttrVal {
AttrVal::Bool(b)
Expand Down Expand Up @@ -559,7 +541,7 @@ pub mod conversion {
impl_from_integer!(i8);
impl_from_integer!(i16);
impl_from_integer!(i32);
//impl_from_integer!(i64);
impl_from_integer!(i64);
impl_from_integer!(u8);
impl_from_integer!(u16);
impl_from_integer!(u32);
Expand All @@ -575,7 +557,7 @@ pub mod conversion {
}

impl_from_bigint!(u64);
//impl_from_bigint!(i128);
impl_from_bigint!(i128);

macro_rules! impl_from_float {
($ty:ty) => {
Expand All @@ -588,7 +570,7 @@ pub mod conversion {
}

impl_from_float!(f32);
//impl_from_float!(f64);
impl_from_float!(f64);

macro_rules! impl_try_from_attr_val {
($variant:path, $ty:ty, $expected:path) => {
Expand Down

0 comments on commit 76012d5

Please sign in to comment.