From 892d043a78491d868d37ab4f7ea2fa72c17a8abd Mon Sep 17 00:00:00 2001 From: Miraculous Owonubi Date: Mon, 24 Jun 2024 03:16:50 +0300 Subject: [PATCH] fmt application --- crates/network/src/stream/codec.rs | 3 ++- crates/sdk/src/env/ext.rs | 3 +-- crates/server/src/admin/handlers/add_client_key.rs | 2 +- crates/server/src/admin/service.rs | 3 +-- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/crates/network/src/stream/codec.rs b/crates/network/src/stream/codec.rs index dd2b3e739..337ab5f5f 100644 --- a/crates/network/src/stream/codec.rs +++ b/crates/network/src/stream/codec.rs @@ -49,11 +49,12 @@ impl Encoder for MessageJsonCodec { #[cfg(test)] mod tests { - use super::*; use futures_util::StreamExt; use tokio_test::io::Builder; use tokio_util::codec::FramedRead; + use super::*; + #[test] fn test_my_frame_encoding_decoding() { let request = Message { diff --git a/crates/sdk/src/env/ext.rs b/crates/sdk/src/env/ext.rs index 182dd4c98..ef2d60a48 100644 --- a/crates/sdk/src/env/ext.rs +++ b/crates/sdk/src/env/ext.rs @@ -1,6 +1,5 @@ -use crate::sys; - use super::{expected_boolean, expected_register, panic_str, read_register, DATA_REGISTER}; +use crate::sys; #[doc(hidden)] pub unsafe fn fetch( diff --git a/crates/server/src/admin/handlers/add_client_key.rs b/crates/server/src/admin/handlers/add_client_key.rs index 22139d454..8caf2e7d2 100644 --- a/crates/server/src/admin/handlers/add_client_key.rs +++ b/crates/server/src/admin/handlers/add_client_key.rs @@ -92,7 +92,7 @@ pub fn store_client_key( wallet_type: WalletType::NEAR, signing_key: req.payload.message.public_key.clone(), created_at: Utc::now().timestamp_millis() as u64, - context_id: req.context_id.clone() + context_id: req.context_id.clone(), }; add_client_key(&store, client_key).map_err(|e| parse_api_error(e))?; info!("Client key stored successfully."); diff --git a/crates/server/src/admin/service.rs b/crates/server/src/admin/service.rs index 7a5ca3ea8..dcb3e5686 100644 --- a/crates/server/src/admin/service.rs +++ b/crates/server/src/admin/service.rs @@ -14,9 +14,8 @@ use serde_json::json; use tower_sessions::{MemoryStore, SessionManagerLayer}; use tracing::info; -use crate::middleware; - use super::handlers; +use crate::middleware; #[derive(Debug, Serialize, Deserialize)] pub struct AdminConfig {