Skip to content

Commit

Permalink
chore: add #[derive(Default)] on MessageDescriptors
Browse files Browse the repository at this point in the history
  • Loading branch information
enmand committed Oct 29, 2024
1 parent 4c77bf5 commit 5783628
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pub struct ConfigureDescriptor {
pub definition: ProtocolDefinition,
}

#[derive(Serialize, Deserialize, Debug, PartialEq, Clone)]
#[derive(Serialize, Deserialize, Debug, PartialEq, Clone, Default)]
pub struct ProtocolDefinition {
pub protocol: String,
pub published: bool,
Expand Down
2 changes: 1 addition & 1 deletion crates/dwn-rs-message-derive/src/derive/descriptor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ pub(crate) fn impl_descriptor_macro_attr(attrs: DescriptorAttr, input: TokenStre

let output = quote_spanned! { ast.span() =>
#[serde_with::skip_serializing_none]
#[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq, Clone)]
#[derive(serde::Serialize, serde::Deserialize, Default, Debug, PartialEq, Clone)]
#[serde(into = #intofrom, from = #intofrom)]
#items

Expand Down

0 comments on commit 5783628

Please sign in to comment.