diff --git a/src/activitystream/link.rs b/src/activitystream/link.rs index 9041118..bf52e84 100644 --- a/src/activitystream/link.rs +++ b/src/activitystream/link.rs @@ -3,8 +3,8 @@ use crate::strenum; strenum! { pub enum LinkType { Link, - Mention - } + Mention; + }; } pub trait Link : super::Base { diff --git a/src/activitystream/mod.rs b/src/activitystream/mod.rs index 6bb5356..1e72c6b 100644 --- a/src/activitystream/mod.rs +++ b/src/activitystream/mod.rs @@ -13,11 +13,10 @@ use crate::strenum; strenum! { pub enum BaseType { - Invalid - + ; Object(ObjectType), Link(LinkType) - } + }; } pub trait Base { diff --git a/src/activitystream/object/activity/accept.rs b/src/activitystream/object/activity/accept.rs index 5a69328..aebbae4 100644 --- a/src/activitystream/object/activity/accept.rs +++ b/src/activitystream/object/activity/accept.rs @@ -3,8 +3,8 @@ use crate::strenum; strenum! { pub enum AcceptType { Accept, - TentativeAccept - } + TentativeAccept; + }; } pub trait Accept : super::Activity { diff --git a/src/activitystream/object/activity/ignore.rs b/src/activitystream/object/activity/ignore.rs index fe6f343..5c93a9c 100644 --- a/src/activitystream/object/activity/ignore.rs +++ b/src/activitystream/object/activity/ignore.rs @@ -3,8 +3,8 @@ use crate::strenum; strenum! { pub enum IgnoreType { Ignore, - Block - } + Block; + }; } pub trait Ignore : super::Activity { diff --git a/src/activitystream/object/activity/intransitive.rs b/src/activitystream/object/activity/intransitive.rs index 2d51301..f0bafbb 100644 --- a/src/activitystream/object/activity/intransitive.rs +++ b/src/activitystream/object/activity/intransitive.rs @@ -5,8 +5,8 @@ strenum! { IntransitiveActivity, Arrive, Question, - Travel - } + Travel; + }; } pub trait IntransitiveActivity : super::Activity { diff --git a/src/activitystream/object/activity/mod.rs b/src/activitystream/object/activity/mod.rs index c5b43ec..6f394c4 100644 --- a/src/activitystream/object/activity/mod.rs +++ b/src/activitystream/object/activity/mod.rs @@ -36,14 +36,14 @@ strenum! { Remove, Undo, Update, - View + View; IntransitiveActivity(IntransitiveActivityType), Accept(AcceptType), Ignore(IgnoreType), Offer(OfferType), Reject(RejectType) - } + }; } pub trait Activity : super::Object { diff --git a/src/activitystream/object/activity/offer.rs b/src/activitystream/object/activity/offer.rs index 5422242..142cbac 100644 --- a/src/activitystream/object/activity/offer.rs +++ b/src/activitystream/object/activity/offer.rs @@ -3,8 +3,8 @@ use crate::strenum; strenum! { pub enum OfferType { Offer, - Invite - } + Invite; + }; } pub trait Offer : super::Activity { diff --git a/src/activitystream/object/activity/reject.rs b/src/activitystream/object/activity/reject.rs index 7e5dd66..1f430be 100644 --- a/src/activitystream/object/activity/reject.rs +++ b/src/activitystream/object/activity/reject.rs @@ -3,8 +3,8 @@ use crate::strenum; strenum! { pub enum RejectType { Reject, - TentativeReject - } + TentativeReject; + }; } pub trait Reject : super::Activity { diff --git a/src/activitystream/object/actor.rs b/src/activitystream/object/actor.rs index a89ea64..066fc27 100644 --- a/src/activitystream/object/actor.rs +++ b/src/activitystream/object/actor.rs @@ -8,8 +8,8 @@ strenum! { Group, Organization, Person, - Object - } + Object; + }; } pub trait Profile : super::Object { diff --git a/src/activitystream/object/collection/mod.rs b/src/activitystream/object/collection/mod.rs index d653bc1..f9acbbf 100644 --- a/src/activitystream/object/collection/mod.rs +++ b/src/activitystream/object/collection/mod.rs @@ -9,8 +9,8 @@ strenum! { Collection, CollectionPage, OrderedCollection, - OrderedCollectionPage - } + OrderedCollectionPage; + }; } pub trait Collection : super::Object { diff --git a/src/activitystream/object/document.rs b/src/activitystream/object/document.rs index 346c46e..1743d6b 100644 --- a/src/activitystream/object/document.rs +++ b/src/activitystream/object/document.rs @@ -6,8 +6,8 @@ strenum! { Audio, Image, Page, - Video - } + Video; + }; } pub trait Document : super::Object { diff --git a/src/activitystream/object/mod.rs b/src/activitystream/object/mod.rs index 02965a7..6402477 100644 --- a/src/activitystream/object/mod.rs +++ b/src/activitystream/object/mod.rs @@ -29,13 +29,13 @@ strenum! { Place, Profile, Relationship, - Tombstone + Tombstone; Activity(ActivityType), Actor(ActorType), Collection(CollectionType), Document(DocumentType) - } + }; } pub trait Object : super::Base { diff --git a/src/activitystream/types.rs b/src/activitystream/types.rs index 58e863c..b90e3c1 100644 --- a/src/activitystream/types.rs +++ b/src/activitystream/types.rs @@ -16,7 +16,7 @@ impl From for sea_orm::TryGetError { #[macro_export] macro_rules! strenum { - ( $(pub enum $enum_name:ident { $($flat:ident),+ $($deep:ident($inner:ident)),*})+ ) => { + ( $(pub enum $enum_name:ident { $($flat:ident),* ; $($deep:ident($inner:ident)),* };)+ ) => { $( #[derive(PartialEq, Eq, Debug, Clone, Copy)] pub enum $enum_name {