style: fmt the project (#54)

add rustfmt.toml

Signed-off-by: jokemanfire <hu.dingyang@zte.com.cn>
This commit is contained in:
jokemanfire 2025-03-28 23:50:46 +08:00 • committed by GitHub
commit 0a2f13a1f4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,8 +1,5 @@
use crate::{
RoleServer, Service,
model::ClientJsonRpcMessage,
service::{RxJsonRpcMessage, TxJsonRpcMessage},
};
use std::{collections::HashMap, net::SocketAddr, sync::Arc};
use axum::{
Json, Router,
extract::{Query, State},
@ -14,13 +11,16 @@ use axum::{
routing::{get, post},
};
use futures::{Sink, SinkExt, Stream, StreamExt};
use std::{collections::HashMap, net::SocketAddr};
use tokio::io;
use tokio_stream::wrappers::ReceiverStream;
use tokio_util::sync::{CancellationToken, PollSender};
use tracing::Instrument;
use std::sync::Arc;
use tokio::io;
use crate::{
RoleServer, Service,
model::ClientJsonRpcMessage,
service::{RxJsonRpcMessage, TxJsonRpcMessage},
};
type SessionId = Arc<str>;
type TxStore =
Arc<tokio::sync::RwLock<HashMap<SessionId, tokio::sync::mpsc::Sender<ClientJsonRpcMessage>>>>;