From 91dcb79cc1e438d836368fb6c32bd50aebc7fbc7 Mon Sep 17 00:00:00 2001 From: Denis Biryukov Date: Mon, 17 Jun 2024 17:27:02 +0200 Subject: [PATCH] cargo fmt --- src/payload.rs | 50 ++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 40 insertions(+), 10 deletions(-) diff --git a/src/payload.rs b/src/payload.rs index 9d5d977f1..6b7e17959 100644 --- a/src/payload.rs +++ b/src/payload.rs @@ -359,70 +359,100 @@ pub extern "C" fn z_bytes_serialize_from_double(this: *mut MaybeUninit z_error_t { +pub extern "C" fn z_bytes_deserialize_into_uint8( + this: &z_loaned_bytes_t, + dst: &mut u8, +) -> z_error_t { z_bytes_deserialize_into_arithmetic::(this, dst) } /// Deserializes into an unsigned integer. /// @return 0 in case of success, negative error code otherwise. #[no_mangle] -pub extern "C" fn z_bytes_deserialize_into_uint16(this: &z_loaned_bytes_t, dst: &mut u16) -> z_error_t { +pub extern "C" fn z_bytes_deserialize_into_uint16( + this: &z_loaned_bytes_t, + dst: &mut u16, +) -> z_error_t { z_bytes_deserialize_into_arithmetic::(this, dst) } /// Deserializes into an unsigned integer. /// @return 0 in case of success, negative error code otherwise. #[no_mangle] -pub extern "C" fn z_bytes_deserialize_into_uint32(this: &z_loaned_bytes_t, dst: &mut u32) -> z_error_t { +pub extern "C" fn z_bytes_deserialize_into_uint32( + this: &z_loaned_bytes_t, + dst: &mut u32, +) -> z_error_t { z_bytes_deserialize_into_arithmetic::(this, dst) } /// Deserializes into an unsigned integer. /// @return 0 in case of success, negative error code otherwise. #[no_mangle] -pub extern "C" fn z_bytes_deserialize_into_uint64(this: &z_loaned_bytes_t, dst: &mut u64) -> z_error_t { +pub extern "C" fn z_bytes_deserialize_into_uint64( + this: &z_loaned_bytes_t, + dst: &mut u64, +) -> z_error_t { z_bytes_deserialize_into_arithmetic::(this, dst) } /// Deserializes into a signed integer. /// @return 0 in case of success, negative error code otherwise. #[no_mangle] -pub extern "C" fn z_bytes_deserialize_into_int8(this: &z_loaned_bytes_t, dst: &mut i8) -> z_error_t { +pub extern "C" fn z_bytes_deserialize_into_int8( + this: &z_loaned_bytes_t, + dst: &mut i8, +) -> z_error_t { z_bytes_deserialize_into_arithmetic::(this, dst) } /// Deserializes into a signed integer. /// @return 0 in case of success, negative error code otherwise. #[no_mangle] -pub extern "C" fn z_bytes_deserialize_into_int16(this: &z_loaned_bytes_t, dst: &mut i16) -> z_error_t { +pub extern "C" fn z_bytes_deserialize_into_int16( + this: &z_loaned_bytes_t, + dst: &mut i16, +) -> z_error_t { z_bytes_deserialize_into_arithmetic::(this, dst) } /// Deserializes into a signed integer. /// @return 0 in case of success, negative error code otherwise. #[no_mangle] -pub extern "C" fn z_bytes_deserialize_into_int32(this: &z_loaned_bytes_t, dst: &mut i32) -> z_error_t { +pub extern "C" fn z_bytes_deserialize_into_int32( + this: &z_loaned_bytes_t, + dst: &mut i32, +) -> z_error_t { z_bytes_deserialize_into_arithmetic::(this, dst) } /// Deserializes into a signed integer. /// @return 0 in case of success, negative error code otherwise. #[no_mangle] -pub extern "C" fn z_bytes_deserialize_into_int64(this: &z_loaned_bytes_t, dst: &mut i64) -> z_error_t { +pub extern "C" fn z_bytes_deserialize_into_int64( + this: &z_loaned_bytes_t, + dst: &mut i64, +) -> z_error_t { z_bytes_deserialize_into_arithmetic::(this, dst) } /// Deserializes into a float. /// @return 0 in case of success, negative error code otherwise. #[no_mangle] -pub extern "C" fn z_bytes_deserialize_into_float(this: &z_loaned_bytes_t, dst: &mut f32) -> z_error_t { +pub extern "C" fn z_bytes_deserialize_into_float( + this: &z_loaned_bytes_t, + dst: &mut f32, +) -> z_error_t { z_bytes_deserialize_into_arithmetic::(this, dst) } /// Deserializes into a signed integer. /// @return 0 in case of success, negative error code otherwise. #[no_mangle] -pub extern "C" fn z_bytes_deserialize_into_double(this: &z_loaned_bytes_t, dst: &mut f64) -> z_error_t { +pub extern "C" fn z_bytes_deserialize_into_double( + this: &z_loaned_bytes_t, + dst: &mut f64, +) -> z_error_t { z_bytes_deserialize_into_arithmetic::(this, dst) }