Skip to content

Commit 80c457b

Browse files
committed
chore: fix linter warnings
Signed-off-by: Flavio Castelli <[email protected]>
1 parent 5284c57 commit 80c457b

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/metadata.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,18 @@ use std::{convert::TryFrom, fmt};
77
///
88
/// Policies built with this SDK provide the right value via the `protocol_version_guest`
99
/// function.
10-
#[derive(Deserialize, Serialize, Debug, Clone, FromPrimitive, ToPrimitive, PartialEq, Eq)]
10+
#[derive(
11+
Deserialize, Serialize, Debug, Clone, FromPrimitive, ToPrimitive, PartialEq, Eq, Default,
12+
)]
1113
pub enum ProtocolVersion {
1214
/// This is an invalid version
1315
#[serde(rename = "Unknown")]
1416
Unknown = 0,
1517
#[serde(rename = "v1")]
18+
#[default]
1619
V1,
1720
}
1821

19-
impl Default for ProtocolVersion {
20-
fn default() -> Self {
21-
Self::V1
22-
}
23-
}
24-
2522
impl TryFrom<Vec<u8>> for ProtocolVersion {
2623
type Error = anyhow::Error;
2724

0 commit comments

Comments
 (0)