chore: format code correctly (#66)

This commit is contained in:
Jefry Dewangga 2025-03-30 15:29:13 +00:00 • committed by GitHub
commit d6fb12b69f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -164,14 +164,13 @@ impl ServerHandler for Counter {
match name.as_str() {
"example_prompt" => {
let message = arguments
.and_then(
|json|
json.get("message")
?.as_str()
.map(|s| s.to_string()))
.ok_or_else(|| McpError::invalid_params("No message provided to example_prompt", None))?;
.and_then(|json| json.get("message")?.as_str().map(|s| s.to_string()))
.ok_or_else(|| {
McpError::invalid_params("No message provided to example_prompt", None)
})?;
let prompt = format!("This is an example prompt with your message here: '{message}'");
let prompt =
format!("This is an example prompt with your message here: '{message}'");
Ok(GetPromptResult {
description: None,
messages: vec![PromptMessage {