Skip to content

Commit c5a6c37

Browse files
authored
chore: fix clippy warning (#14)
* feat: implement default trait for Result * implement Display trait for ClientMessage and ServerMessage variants * fix: typo * Derive Display for result
1 parent 7f8231f commit c5a6c37

File tree

2 files changed

+4
-18
lines changed

2 files changed

+4
-18
lines changed

src/generated_schema/2024_11_05/mcp_schema.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4534,22 +4534,15 @@ pub struct ResourceUpdatedNotificationParams {
45344534
///}
45354535
/// ```
45364536
/// </details>
4537-
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4537+
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Default)]
45384538
pub struct Result {
45394539
///This result property is reserved by the protocol to allow clients and servers to attach additional metadata to their responses.
45404540
#[serde(rename = "_meta", default, skip_serializing_if = "::std::option::Option::is_none")]
45414541
pub meta: ::std::option::Option<::serde_json::Map<::std::string::String, ::serde_json::Value>>,
45424542
#[serde(flatten, default, skip_serializing_if = "::std::option::Option::is_none")]
45434543
pub extra: ::std::option::Option<::serde_json::Map<::std::string::String, ::serde_json::Value>>,
45444544
}
4545-
impl ::std::default::Default for Result {
4546-
fn default() -> Self {
4547-
Self {
4548-
meta: Default::default(),
4549-
extra: Default::default(),
4550-
}
4551-
}
4552-
}
4545+
45534546
///The sender or recipient of messages and data in a conversation.
45544547
///
45554548
/// <details><summary>JSON schema</summary>

src/generated_schema/draft/mcp_schema.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4665,22 +4665,15 @@ pub struct ResourceUpdatedNotificationParams {
46654665
///}
46664666
/// ```
46674667
/// </details>
4668-
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4668+
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Default)]
46694669
pub struct Result {
46704670
///This result property is reserved by the protocol to allow clients and servers to attach additional metadata to their responses.
46714671
#[serde(rename = "_meta", default, skip_serializing_if = "::std::option::Option::is_none")]
46724672
pub meta: ::std::option::Option<::serde_json::Map<::std::string::String, ::serde_json::Value>>,
46734673
#[serde(flatten, default, skip_serializing_if = "::std::option::Option::is_none")]
46744674
pub extra: ::std::option::Option<::serde_json::Map<::std::string::String, ::serde_json::Value>>,
46754675
}
4676-
impl ::std::default::Default for Result {
4677-
fn default() -> Self {
4678-
Self {
4679-
meta: Default::default(),
4680-
extra: Default::default(),
4681-
}
4682-
}
4683-
}
4676+
46844677
///The sender or recipient of messages and data in a conversation.
46854678
///
46864679
/// <details><summary>JSON schema</summary>

0 commit comments

Comments
 (0)