diff --git a/crates/rmcp/src/model.rs b/crates/rmcp/src/model.rs index 358a3b1..73d622c 100644 --- a/crates/rmcp/src/model.rs +++ b/crates/rmcp/src/model.rs @@ -1474,6 +1474,14 @@ macro_rules! ts_union { pub enum $U { $($V($V),)* } + + $( + impl From<$V> for $U { + fn from(value: $V) -> Self { + $U::$V(value) + } + } + )* }; } @@ -1598,17 +1606,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