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,10 +1,13 @@
use crate::error::Error as McpError;
use crate::model::{
CancelledNotification, CancelledNotificationParam, JsonRpcMessage, Message, RequestId,
};
use crate::transport::IntoTransport;
use futures::future::BoxFuture;
use thiserror::Error;
use crate::{
error::Error as McpError,
model::{
CancelledNotification, CancelledNotificationParam, JsonRpcMessage, Message, RequestId,
},
transport::IntoTransport,
};
#[cfg(feature = "client")]
mod client;
#[cfg(feature = "client")]
@ -15,10 +18,9 @@ mod server;
pub use server::*;
#[cfg(feature = "tower")]
mod tower;
use tokio_util::sync::CancellationToken;
#[cfg(feature = "tower")]
pub use tower::*;
use tokio_util::sync::CancellationToken;
use tracing::instrument;
#[derive(Error, Debug)]
#[non_exhaustive]
@ -189,11 +191,12 @@ impl<R: ServiceRole, S: Service<R>> DynService<R> for S {
}
}
use std::collections::HashMap;
use std::ops::Deref;
use std::sync::Arc;
use std::sync::atomic::AtomicU32;
use std::time::Duration;
use std::{
collections::HashMap,
ops::Deref,
sync::{Arc, atomic::AtomicU32},
time::Duration,
};
use tokio::sync::mpsc;