From a9e6c05f251a904dc7ca2019c0021bd0e61b8ab1 Mon Sep 17 00:00:00 2001 From: Tony Arcieri Date: Fri, 15 Mar 2024 16:29:44 -0600 Subject: [PATCH] cosmos-sdk-proto: remove deprecated `MessageExt` methods --- cosmos-sdk-proto/src/traits.rs | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/cosmos-sdk-proto/src/traits.rs b/cosmos-sdk-proto/src/traits.rs index 2a156460..1484fa50 100644 --- a/cosmos-sdk-proto/src/traits.rs +++ b/cosmos-sdk-proto/src/traits.rs @@ -2,30 +2,11 @@ pub use prost::{Message, Name}; -use crate::Any; -use prost::{DecodeError, EncodeError}; +use prost::EncodeError; use std::str::FromStr; /// Extension trait for [`Message`]. pub trait MessageExt: Message { - /// Parse this message proto from [`Any`]. - #[deprecated(since = "0.20.0", note = "use Any::to_msg instead")] - fn from_any(any: &Any) -> Result - where - Self: Default + Name + Sized, - { - any.to_msg() - } - - /// Serialize this message proto as [`Any`]. - #[deprecated(since = "0.20.0", note = "use Any::from_msg instead")] - fn to_any(&self) -> Result - where - Self: Name + Sized, - { - Any::from_msg(self) - } - /// Serialize this protobuf message as a byte vector. fn to_bytes(&self) -> Result, EncodeError>; }