diff --git a/crates/rmcp/src/model.rs b/crates/rmcp/src/model.rs index d2cd43db..ba2c2a61 100644 --- a/crates/rmcp/src/model.rs +++ b/crates/rmcp/src/model.rs @@ -1471,6 +1471,14 @@ macro_rules! ts_union { pub enum $U { $($V($V),)* } + + $( + impl From<$V> for $U { + fn from(value: $V) -> Self { + $U::$V(value) + } + } + )* }; } @@ -1575,17 +1583,6 @@ impl TryInto for ClientNotification { } } } -impl From for ServerNotification { - fn from(value: CancelledNotification) -> Self { - ServerNotification::CancelledNotification(value) - } -} - -impl From for ClientNotification { - fn from(value: CancelledNotification) -> Self { - ClientNotification::CancelledNotification(value) - } -} // ============================================================================= // TESTS