@@ -15,10 +15,9 @@ use std::collections::HashSet;
1515
1616const URL : & str = "/2/dm_conversations/:dm_conversation_id/dm_events" ;
1717
18- #[ derive( Serialize , Deserialize , Debug , Eq , Hash , PartialEq , Clone , Default ) ]
18+ #[ derive( Serialize , Deserialize , Debug , Eq , Hash , PartialEq , Clone ) ]
1919pub enum EventTypes {
2020 #[ serde( rename = "MessageCreate" ) ]
21- #[ default]
2221 Messagecreate ,
2322 #[ serde( rename = "ParticipantsJoin" ) ]
2423 Participantsjoin ,
@@ -36,10 +35,15 @@ impl std::fmt::Display for EventTypes {
3635 }
3736}
3837
39- #[ derive( Serialize , Deserialize , Debug , Eq , Hash , PartialEq , Clone , Default ) ]
38+ impl Default for EventTypes {
39+ fn default ( ) -> Self {
40+ Self :: Messagecreate
41+ }
42+ }
43+
44+ #[ derive( Serialize , Deserialize , Debug , Eq , Hash , PartialEq , Clone ) ]
4045pub enum Expansions {
4146 #[ serde( rename = "attachments.media_keys" ) ]
42- #[ default]
4347 AttachmentsMediaKeys ,
4448 #[ serde( rename = "referenced_tweets.id" ) ]
4549 ReferencedTweetsId ,
@@ -71,6 +75,12 @@ impl std::fmt::Display for Expansions {
7175 }
7276}
7377
78+ impl Default for Expansions {
79+ fn default ( ) -> Self {
80+ Self :: AttachmentsMediaKeys
81+ }
82+ }
83+
7484#[ derive( Debug , Clone , Default ) ]
7585pub struct Api {
7686 dm_conversation_id : String ,
0 commit comments