Merge pull request #353 from vadorovsky/log-remove-u128

aya-log: Remove i128 and u128 types
pull/339/head
Michal Rostecki 2 years ago committed by GitHub
commit d968094b66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -50,14 +50,12 @@ pub enum ArgType {
I16,
I32,
I64,
I128,
Isize,
U8,
U16,
U32,
U64,
U128,
Usize,
F32,
@ -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);

@ -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(|_| ())?)
@ -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(|_| ())?)

Loading…
Cancel
Save