fix(build): fix build of the project when no features are selected (#606)
This commit is contained in:
parent
46e149ee8b
commit
acb06ea819
1 changed files with 37 additions and 2 deletions
|
|
@ -40,10 +40,15 @@
|
|||
//!
|
||||
//! ```rust
|
||||
//! # use rmcp::{
|
||||
//! # ServiceExt, serve_client, serve_server,
|
||||
//! # ServiceExt, serve_server,
|
||||
//! # };
|
||||
//! #[cfg(feature = "client")]
|
||||
//! #[cfg_attr(docsrs, doc(cfg(feature = "client")))]
|
||||
//! # use rmcp::serve_client;
|
||||
//!
|
||||
//! // create transport from tcp stream
|
||||
//! #[cfg(feature = "client")]
|
||||
//! #[cfg_attr(docsrs, doc(cfg(feature = "client")))]
|
||||
//! async fn client() -> Result<(), Box<dyn std::error::Error>> {
|
||||
//! let stream = tokio::net::TcpSocket::new_v4()?
|
||||
//! .connect("127.0.0.1:8001".parse()?)
|
||||
|
|
@ -55,6 +60,8 @@
|
|||
//! }
|
||||
//!
|
||||
//! // create transport from std io
|
||||
//! #[cfg(feature = "client")]
|
||||
//! #[cfg_attr(docsrs, doc(cfg(feature = "client")))]
|
||||
//! async fn io() -> Result<(), Box<dyn std::error::Error>> {
|
||||
//! let client = ().serve((tokio::io::stdin(), tokio::io::stdout())).await?;
|
||||
//! let tools = client.peer().list_tools(Default::default()).await?;
|
||||
|
|
|
|||
Loading…
Reference in a new issue