Skip to content

Commit 4f7d05f

Browse files
committed
fmt
1 parent aa10a77 commit 4f7d05f

File tree

11 files changed

+25
-25
lines changed

11 files changed

+25
-25
lines changed

crates/rmcp-core/src/lib.rs

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
mod error;
2-
pub use error::Error;
1+
mod error;
2+
pub use error::Error;
33

4-
pub mod model;
5-
pub use model::*;
4+
pub mod model;
5+
pub use model::*;
66

7-
#[cfg(feature = "macros")]
8-
pub use paste;
7+
#[cfg(feature = "macros")]
8+
pub use paste;
99

10-
#[cfg(feature = "macros")]
11-
pub use rmcp_macros::tool;
12-
13-
10+
#[cfg(feature = "macros")]
11+
pub use rmcp_macros::tool;

crates/rmcp-core/src/model.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1229,4 +1229,3 @@ mod tests {
12291229
assert!(v1 < v2);
12301230
}
12311231
}
1232-

crates/rmcp/src/handler/server/tool.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,6 @@ pub trait FromToolCallContextPart<'a, S>: Sized {
8686
) -> Result<(Self, ToolCallContext<'a, S>), crate::Error>;
8787
}
8888

89-
90-
9189
pin_project_lite::pin_project! {
9290
#[project = IntoCallToolResultFutProj]
9391
pub enum IntoCallToolResultFut<F, R> {
@@ -123,8 +121,6 @@ where
123121
}
124122
}
125123

126-
127-
128124
pub trait CallToolHandler<'a, S, A> {
129125
type Fut: Future<Output = Result<CallToolResult, crate::Error>> + Send + 'a;
130126
fn call(self, context: ToolCallContext<'a, S>) -> Self::Fut;

crates/rmcp/tests/common/calculator.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use rmcp::{
22
ServerHandler,
3-
model::{ServerCapabilities, ServerInfo, IntoCallToolResult, IntoContents},
3+
model::{IntoCallToolResult, IntoContents, ServerCapabilities, ServerInfo},
44
schemars, tool,
55
};
66
#[derive(Debug, serde::Deserialize, schemars::JsonSchema)]

crates/rmcp/tests/test_tool_macros.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
use std::sync::Arc;
22

3-
use rmcp::{ServerHandler, handler::server::tool::ToolCallContext, tool,
4-
model::{IntoCallToolResult, IntoContents, EmptyObject}};
3+
use rmcp::{
4+
ServerHandler,
5+
handler::server::tool::ToolCallContext,
6+
model::{EmptyObject, IntoCallToolResult, IntoContents},
7+
tool,
8+
};
59
use schemars::JsonSchema;
610
use serde::{Deserialize, Serialize};
711

examples/servers/src/common/calculator.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use rmcp::{
22
ServerHandler,
33
handler::server::wrapper::Json,
4-
model::{ServerCapabilities, ServerInfo, IntoCallToolResult, IntoContents},
4+
model::{IntoCallToolResult, IntoContents, ServerCapabilities, ServerInfo},
55
schemars, tool,
66
};
77

examples/servers/src/common/counter.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
use std::sync::Arc;
22

33
use rmcp::{
4-
Error as McpError, RoleServer, ServerHandler, model::*,
5-
service::RequestContext, tool, schemars,
4+
Error as McpError, RoleServer, ServerHandler, model::*, schemars, service::RequestContext, tool,
65
};
76
use rmcp_core::const_string;
87
use serde_json::json;

examples/servers/src/common/generic_service.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use std::sync::Arc;
22

33
use rmcp::{
44
ServerHandler,
5-
model::{ServerCapabilities, ServerInfo, IntoCallToolResult, IntoContents},
5+
model::{IntoCallToolResult, IntoContents, ServerCapabilities, ServerInfo},
66
schemars, tool,
77
};
88

examples/transport/src/common/calculator.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
use rmcp::{ServerHandler, model::{ServerInfo, IntoCallToolResult}, schemars, tool, tool_box};
1+
use rmcp::{
2+
ServerHandler,
3+
model::{IntoCallToolResult, ServerInfo},
4+
schemars, tool, tool_box,
5+
};
26

37
#[derive(Debug, serde::Deserialize, schemars::JsonSchema)]
48
pub struct SumRequest {

examples/transport/src/unix_socket.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use std::fs;
22

33
use common::calculator::Calculator;
4-
use rmcp::{serve_client, serve_server, model::CallToolRequestParam};
4+
use rmcp::{model::CallToolRequestParam, serve_client, serve_server};
55
use rmcp_core::object;
66
use tokio::net::{UnixListener, UnixStream};
77

0 commit comments

Comments
 (0)