chore: consolidate repeated rmcp tests (#931)

This commit is contained in:
Dale Seo 2026-06-26 16:15:20 -04:00 • committed by GitHub
commit e1af378949
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -11,20 +11,20 @@ use rmcp::{
};
#[derive(Debug, Default)]
pub struct TestHandler<T: 'static = ()> {
pub _marker: std::marker::PhantomData<fn(*const T)>,
struct TestHandler<T: 'static = ()> {
_marker: std::marker::PhantomData<fn(*const T)>,
}
impl<T: 'static> ServerHandler for TestHandler<T> {}
#[derive(Debug, schemars::JsonSchema, serde::Deserialize, serde::Serialize)]
pub struct Request {
pub fields: HashMap<String, String>,
struct Request {
fields: HashMap<String, String>,
}
#[derive(Debug, schemars::JsonSchema, serde::Deserialize, serde::Serialize)]
pub struct Sum {
pub a: i32,
pub b: i32,
struct Sum {
a: i32,
b: i32,
}
#[rmcp::tool_router(router = test_router_1)]