Skip to content

Commit

Permalink
Merge pull request #353 from vadorovsky/log-remove-u128
Browse files Browse the repository at this point in the history
aya-log: Remove i128 and u128 types
  • Loading branch information
vadorovsky authored Jul 28, 2022
2 parents f37a514 + 611f967 commit d968094
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
4 changes: 0 additions & 4 deletions aya-log-common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,12 @@ pub enum ArgType {
I16,
I32,
I64,
I128,
Isize,

U8,
U16,
U32,
U64,
U128,
Usize,

F32,
Expand Down Expand Up @@ -132,14 +130,12 @@ impl_write_to_buf!(i8, ArgType::I8);
impl_write_to_buf!(i16, ArgType::I16);
impl_write_to_buf!(i32, ArgType::I32);
impl_write_to_buf!(i64, ArgType::I64);
impl_write_to_buf!(i128, ArgType::I128);
impl_write_to_buf!(isize, ArgType::Isize);

impl_write_to_buf!(u8, ArgType::U8);
impl_write_to_buf!(u16, ArgType::U16);
impl_write_to_buf!(u32, ArgType::U32);
impl_write_to_buf!(u64, ArgType::U64);
impl_write_to_buf!(u128, ArgType::U128);
impl_write_to_buf!(usize, ArgType::Usize);

impl_write_to_buf!(f32, ArgType::F32);
Expand Down
10 changes: 0 additions & 10 deletions aya-log/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,6 @@ fn log_buf(mut buf: &[u8], logger: &dyn Log) -> Result<(), ()> {
i64::from_ne_bytes(attr.value.try_into().map_err(|_| ())?).to_string(),
);
}
ArgType::I128 => {
args.push(
i128::from_ne_bytes(attr.value.try_into().map_err(|_| ())?).to_string(),
);
}
ArgType::Isize => {
args.push(
isize::from_ne_bytes(attr.value.try_into().map_err(|_| ())?)
Expand All @@ -249,11 +244,6 @@ fn log_buf(mut buf: &[u8], logger: &dyn Log) -> Result<(), ()> {
u64::from_ne_bytes(attr.value.try_into().map_err(|_| ())?).to_string(),
);
}
ArgType::U128 => {
args.push(
u128::from_ne_bytes(attr.value.try_into().map_err(|_| ())?).to_string(),
);
}
ArgType::Usize => {
args.push(
usize::from_ne_bytes(attr.value.try_into().map_err(|_| ())?)
Expand Down

0 comments on commit d968094

Please sign in to comment.