diff --git a/crates/services/p2p/src/codecs/postcard.rs b/crates/services/p2p/src/codecs/postcard.rs index ae83424873..b2701c0be6 100644 --- a/crates/services/p2p/src/codecs/postcard.rs +++ b/crates/services/p2p/src/codecs/postcard.rs @@ -188,18 +188,13 @@ impl NetworkCodec for PostcardCodec { } } -#[derive(Debug, Clone, EnumIter)] +#[derive(Debug, Default, Clone, EnumIter)] pub enum PostcardProtocol { + #[default] V1, V2, } -impl Default for PostcardProtocol { - fn default() -> Self { - PostcardProtocol::V1 - } -} - impl AsRef for PostcardProtocol { fn as_ref(&self) -> &str { match self {