From 31921d5c6568a2c880b49ac7a98e9b0146f37333 Mon Sep 17 00:00:00 2001 From: Lasse Alm Date: Wed, 4 Dec 2024 11:30:55 +0100 Subject: [PATCH] fmt --- backend-rust/src/graphql_api.rs | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/backend-rust/src/graphql_api.rs b/backend-rust/src/graphql_api.rs index 8595cb78..06dfb6dc 100644 --- a/backend-rust/src/graphql_api.rs +++ b/backend-rust/src/graphql_api.rs @@ -4918,17 +4918,16 @@ pub struct CredentialsUpdated { #[derive(SimpleObject, serde::Serialize, serde::Deserialize)] #[graphql(complex)] pub struct DataRegistered { - data_as_hex: String + data_as_hex: String, } #[ComplexObject] impl DataRegistered { async fn decoded(&self) -> ApiResult { - let decoded_data = hex::decode(&self.data_as_hex) - .map_err(|e| { - error!("Invalid hex encoding {:?} in a controlled environment", e); - ApiError::InternalError("Failed to decode hex data".to_string()) - })?; + let decoded_data = hex::decode(&self.data_as_hex).map_err(|e| { + error!("Invalid hex encoding {:?} in a controlled environment", e); + ApiError::InternalError("Failed to decode hex data".to_string()) + })?; Ok(DecodedText::from_bytes(decoded_data.as_slice())) } @@ -5024,11 +5023,10 @@ pub struct TransferMemo { #[ComplexObject] impl TransferMemo { async fn decoded(&self) -> ApiResult { - let decoded_data = hex::decode(&self.raw_hex) - .map_err(|e| { - error!("Invalid hex encoding {:?} in a controlled environment", e); - ApiError::InternalError("Failed to decode hex data".to_string()) - })?; + let decoded_data = hex::decode(&self.raw_hex).map_err(|e| { + error!("Invalid hex encoding {:?} in a controlled environment", e); + ApiError::InternalError("Failed to decode hex data".to_string()) + })?; Ok(DecodedText::from_bytes(decoded_data.as_slice())) }