Skip to content

Commit bebdf93

Browse files
committed
fix: add Default impl to ElicitationServer for clippy
Resolves clippy::new_without_default warning by implementing Default trait for ElicitationServer struct.
1 parent a7211f3 commit bebdf93

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

examples/servers/src/elicitation_stdio.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,19 @@
22
//!
33
//! Demonstrates user name collection via elicitation
44
5+
use std::sync::Arc;
6+
57
use anyhow::Result;
6-
use rmcp::schemars::JsonSchema;
78
use rmcp::{
89
ErrorData as McpError, ServerHandler, ServiceExt, elicit_safe,
910
handler::server::{router::tool::ToolRouter, tool::Parameters},
1011
model::*,
12+
schemars::JsonSchema,
1113
service::{RequestContext, RoleServer},
1214
tool, tool_handler, tool_router,
1315
transport::stdio,
1416
};
1517
use serde::{Deserialize, Serialize};
16-
use std::sync::Arc;
1718
use tokio::sync::Mutex;
1819
use tracing_subscriber::{self, EnvFilter};
1920

@@ -41,6 +42,12 @@ pub struct ElicitationServer {
4142
tool_router: ToolRouter<ElicitationServer>,
4243
}
4344

45+
impl Default for ElicitationServer {
46+
fn default() -> Self {
47+
Self::new()
48+
}
49+
}
50+
4451
#[tool_router]
4552
impl ElicitationServer {
4653
pub fn new() -> Self {

0 commit comments

Comments
 (0)