diff --git a/src/data_forms.rs b/src/data_forms.rs index 0899cc5..9905f4b 100644 --- a/src/data_forms.rs +++ b/src/data_forms.rs @@ -25,13 +25,7 @@ generate_attribute!(FieldType, "type", { TextMulti => "text-multi", TextPrivate => "text-private", TextSingle => "text-single", -}); - -impl Default for FieldType { - fn default() -> FieldType { - FieldType::TextSingle - } -} +}, Default = TextSingle); #[derive(Debug, Clone)] pub struct Option_ { diff --git a/src/jingle.rs b/src/jingle.rs index e5fab35..d189684 100644 --- a/src/jingle.rs +++ b/src/jingle.rs @@ -41,13 +41,7 @@ generate_attribute!(Senders, "senders", { Initiator => "initiator", None => "none", Responder => "responder", -}); - -impl Default for Senders { - fn default() -> Senders { - Senders::Both - } -} +}, Default = Both); #[derive(Debug, Clone)] pub struct Content { diff --git a/src/message.rs b/src/message.rs index 4efabbd..79038c1 100644 --- a/src/message.rs +++ b/src/message.rs @@ -108,13 +108,7 @@ generate_attribute!(MessageType, "type", { Groupchat => "groupchat", Headline => "headline", Normal => "normal", -}); - -impl Default for MessageType { - fn default() -> MessageType { - MessageType::Normal - } -} +}, Default = Normal); type Lang = String; type Body = String;