Skip to content

Commit 6d22eea

Browse files
committed
docs: fix doc test in README.md
fix doc test in readme Signed-off-by: jokemanfire <[email protected]>
1 parent 2432b93 commit 6d22eea

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,13 @@ Start a client in one line:
2424
use rmcp::{ServiceExt, transport::TokioChildProcess};
2525
use tokio::process::Command;
2626

27-
let client = ().serve(
28-
TokioChildProcess::new(Command::new("npx").arg("-y").arg("@modelcontextprotocol/server-everything"))?
29-
).await?;
27+
#[tokio::main]
28+
async fn main() -> Result<(), Box<dyn std::error::Error>> {
29+
let client = ().serve(
30+
TokioChildProcess::new(Command::new("npx").arg("-y").arg("@modelcontextprotocol/server-everything"))?
31+
).await?;
32+
Ok(())
33+
}
3034
```
3135

3236
#### 1. Build a transport

0 commit comments

Comments
 (0)