Skip to content

Commit 37d385e

Browse files
committed
fix doc tests
1 parent 085bf78 commit 37d385e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

crates/rmcp/src/service/server.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,8 +400,9 @@ impl Peer<RoleServer> {
400400
/// # Example
401401
/// ```rust,no_run
402402
/// # use rmcp::*;
403+
/// # use rmcp::service::ElicitationError;
403404
/// # use serde_json::json;
404-
/// # async fn example(peer: Peer<RoleServer>) -> Result<(), ServiceError> {
405+
/// # async fn example(peer: Peer<RoleServer>) -> Result<(), ElicitationError> {
405406
/// let schema = json!({
406407
/// "type": "object",
407408
/// "properties": {
@@ -481,6 +482,7 @@ impl Peer<RoleServer> {
481482
///
482483
/// ```rust,no_run
483484
/// # use rmcp::*;
485+
/// # use rmcp::service::ElicitationError;
484486
/// # use serde::{Deserialize, Serialize};
485487
/// # use schemars::JsonSchema;
486488
/// #
@@ -499,6 +501,9 @@ impl Peer<RoleServer> {
499501
/// Ok(Some(profile)) => {
500502
/// println!("Name: {}, Email: {}, Age: {}", profile.name, profile.email, profile.age);
501503
/// }
504+
/// Ok(None) => {
505+
/// println!("User declined to provide information");
506+
/// }
502507
/// Err(ElicitationError::UserDeclined) => {
503508
/// println!("User declined to provide information");
504509
/// }

0 commit comments

Comments
 (0)