Remove unused location and base traits

This commit is contained in:
asonix 2018-05-12 00:39:47 -05:00
parent c0a3fcc321
commit 70d4bab312
34 changed files with 32 additions and 88 deletions

View file

@ -1,7 +1,7 @@
use serde_json;
use super::{kind::AcceptType, properties::ActivityProperties, Activity};
use base::Base;
use error::{Error, Result};
use link::Link;
use object::{Object, ObjectProperties};
@ -45,6 +45,5 @@ impl Accept {
}
}
impl Base for Accept {}
impl Object for Accept {}
impl Activity for Accept {}

View file

@ -1,7 +1,7 @@
use serde_json;
use super::{kind::AddType, properties::ActivityProperties, Activity};
use base::Base;
use error::{Error, Result};
use link::Link;
use object::{Object, ObjectProperties};
@ -45,6 +45,5 @@ impl Add {
}
}
impl Base for Add {}
impl Object for Add {}
impl Activity for Add {}

View file

@ -1,7 +1,7 @@
use serde_json;
use super::{kind::MoveType, properties::ActivityProperties, Activity};
use base::Base;
use error::{Error, Result};
use link::Link;
use object::{Object, ObjectProperties};
@ -84,6 +84,5 @@ impl AMove {
}
}
impl Base for AMove {}
impl Object for AMove {}
impl Activity for AMove {}

View file

@ -1,7 +1,7 @@
use serde_json;
use super::{kind::AnnounceType, properties::ActivityProperties, Activity};
use base::Base;
use error::{Error, Result};
use link::Link;
use object::{Object, ObjectProperties};
@ -66,6 +66,5 @@ impl Announce {
}
}
impl Base for Announce {}
impl Object for Announce {}
impl Activity for Announce {}

View file

@ -1,7 +1,7 @@
use serde_json;
use super::{kind::ArriveType, properties::ActivityProperties, Activity, IntransitiveActivity};
use base::Base;
use error::{Error, Result};
use link::Link;
use object::{Object, ObjectProperties};
@ -70,7 +70,6 @@ impl Arrive {
}
}
impl Base for Arrive {}
impl Object for Arrive {}
impl Activity for Arrive {}
impl IntransitiveActivity for Arrive {}

View file

@ -1,7 +1,7 @@
use serde_json;
use super::{kind::BlockType, properties::ActivityProperties, Activity};
use base::Base;
use error::{Error, Result};
use link::Link;
use object::{Object, ObjectProperties};
@ -45,6 +45,5 @@ impl Block {
}
}
impl Base for Block {}
impl Object for Block {}
impl Activity for Block {}

View file

@ -1,7 +1,7 @@
use serde_json;
use super::{kind::CreateType, properties::ActivityProperties, Activity};
use base::Base;
use error::{Error, Result};
use link::Link;
use object::{Object, ObjectProperties};
@ -45,6 +45,5 @@ impl Create {
}
}
impl Base for Create {}
impl Object for Create {}
impl Activity for Create {}

View file

@ -1,7 +1,7 @@
use serde_json;
use super::{kind::DeleteType, properties::ActivityProperties, Activity};
use base::Base;
use error::{Error, Result};
use link::Link;
use object::{Object, ObjectProperties};
@ -66,6 +66,5 @@ impl Delete {
}
}
impl Base for Delete {}
impl Object for Delete {}
impl Activity for Delete {}

View file

@ -1,7 +1,7 @@
use serde_json;
use super::{kind::DislikeType, properties::ActivityProperties, Activity};
use base::Base;
use error::{Error, Result};
use link::Link;
use object::{Object, ObjectProperties};
@ -45,6 +45,5 @@ impl Dislike {
}
}
impl Base for Dislike {}
impl Object for Dislike {}
impl Activity for Dislike {}

View file

@ -1,7 +1,7 @@
use serde_json;
use super::{kind::FlagType, properties::ActivityProperties, Activity};
use base::Base;
use error::{Error, Result};
use link::Link;
use object::{Object, ObjectProperties};
@ -45,6 +45,5 @@ impl Flag {
}
}
impl Base for Flag {}
impl Object for Flag {}
impl Activity for Flag {}

View file

@ -1,7 +1,7 @@
use serde_json;
use super::{kind::FollowType, properties::ActivityProperties, Activity};
use base::Base;
use error::{Error, Result};
use link::Link;
use object::{Object, ObjectProperties};
@ -45,6 +45,5 @@ impl Follow {
}
}
impl Base for Follow {}
impl Object for Follow {}
impl Activity for Follow {}

View file

@ -1,7 +1,7 @@
use serde_json;
use super::{kind::IgnoreType, properties::ActivityProperties, Activity};
use base::Base;
use error::{Error, Result};
use link::Link;
use object::{Object, ObjectProperties};
@ -45,6 +45,5 @@ impl Ignore {
}
}
impl Base for Ignore {}
impl Object for Ignore {}
impl Activity for Ignore {}

View file

@ -1,7 +1,7 @@
use serde_json;
use super::{kind::InviteType, properties::ActivityProperties, Activity};
use base::Base;
use error::{Error, Result};
use link::Link;
use object::{Object, ObjectProperties};
@ -62,6 +62,5 @@ impl Invite {
}
}
impl Base for Invite {}
impl Object for Invite {}
impl Activity for Invite {}

View file

@ -1,7 +1,7 @@
use serde_json;
use super::{kind::JoinType, properties::ActivityProperties, Activity};
use base::Base;
use error::{Error, Result};
use link::Link;
use object::{Object, ObjectProperties};
@ -45,6 +45,5 @@ impl Join {
}
}
impl Base for Join {}
impl Object for Join {}
impl Activity for Join {}

View file

@ -1,7 +1,7 @@
use serde_json;
use super::{kind::LeaveType, properties::ActivityProperties, Activity};
use base::Base;
use error::{Error, Result};
use link::Link;
use object::{Object, ObjectProperties};
@ -45,6 +45,5 @@ impl Leave {
}
}
impl Base for Leave {}
impl Object for Leave {}
impl Activity for Leave {}

View file

@ -1,7 +1,7 @@
use serde_json;
use super::{kind::LikeType, properties::ActivityProperties, Activity};
use base::Base;
use error::{Error, Result};
use link::Link;
use object::{Object, ObjectProperties};
@ -45,6 +45,5 @@ impl Like {
}
}
impl Base for Like {}
impl Object for Like {}
impl Activity for Like {}

View file

@ -1,7 +1,7 @@
use serde_json;
use super::{kind::ListenType, properties::ActivityProperties, Activity};
use base::Base;
use error::{Error, Result};
use link::Link;
use object::{Object, ObjectProperties};
@ -45,6 +45,5 @@ impl Listen {
}
}
impl Base for Listen {}
impl Object for Listen {}
impl Activity for Listen {}

View file

@ -1,7 +1,7 @@
use serde_json;
use super::{kind::OfferType, properties::ActivityProperties, Activity};
use base::Base;
use error::{Error, Result};
use link::Link;
use object::{Object, ObjectProperties};
@ -66,6 +66,5 @@ impl Offer {
}
}
impl Base for Offer {}
impl Object for Offer {}
impl Activity for Offer {}

View file

@ -2,7 +2,7 @@ use serde::de::DeserializeOwned;
use serde_json;
use super::{kind::QuestionType, properties::ActivityProperties, Activity, IntransitiveActivity};
use base::Base;
use error::{Error, Result};
use link::Link;
use object::{Object, ObjectProperties};
@ -61,7 +61,6 @@ fn vec_item<D: DeserializeOwned>(v: &Option<Vec<serde_json::Value>>) -> Result<V
}
}
impl Base for Question {}
impl Object for Question {}
impl Activity for Question {}
impl IntransitiveActivity for Question {}

View file

@ -1,7 +1,7 @@
use serde_json;
use super::{kind::ReadType, properties::ActivityProperties, Activity};
use base::Base;
use error::{Error, Result};
use link::Link;
use object::{Object, ObjectProperties};
@ -45,6 +45,5 @@ impl Read {
}
}
impl Base for Read {}
impl Object for Read {}
impl Activity for Read {}

View file

@ -1,7 +1,7 @@
use serde_json;
use super::{kind::RejectType, properties::ActivityProperties, Activity};
use base::Base;
use error::{Error, Result};
use link::Link;
use object::{Object, ObjectProperties};
@ -45,6 +45,5 @@ impl Reject {
}
}
impl Base for Reject {}
impl Object for Reject {}
impl Activity for Reject {}

View file

@ -1,7 +1,7 @@
use serde_json;
use super::{kind::RemoveType, properties::ActivityProperties, Activity};
use base::Base;
use error::{Error, Result};
use link::Link;
use object::{Object, ObjectProperties};
@ -84,6 +84,5 @@ impl Remove {
}
}
impl Base for Remove {}
impl Object for Remove {}
impl Activity for Remove {}

View file

@ -1,7 +1,7 @@
use serde_json;
use super::{kind::TentativeAcceptType, properties::ActivityProperties, Activity};
use base::Base;
use error::{Error, Result};
use link::Link;
use object::{Object, ObjectProperties};
@ -45,6 +45,5 @@ impl TentativeAccept {
}
}
impl Base for TentativeAccept {}
impl Object for TentativeAccept {}
impl Activity for TentativeAccept {}

View file

@ -1,7 +1,7 @@
use serde_json;
use super::{kind::TentativeRejectType, properties::ActivityProperties, Activity};
use base::Base;
use error::{Error, Result};
use link::Link;
use object::{Object, ObjectProperties};
@ -45,6 +45,5 @@ impl TentativeReject {
}
}
impl Base for TentativeReject {}
impl Object for TentativeReject {}
impl Activity for TentativeReject {}

View file

@ -1,7 +1,7 @@
use serde_json;
use super::{kind::TravelType, properties::ActivityProperties, Activity, IntransitiveActivity};
use base::Base;
use error::{Error, Result};
use link::Link;
use object::{Object, ObjectProperties};
@ -75,7 +75,6 @@ impl Travel {
}
}
impl Base for Travel {}
impl Object for Travel {}
impl Activity for Travel {}
impl IntransitiveActivity for Travel {}

View file

@ -1,7 +1,7 @@
use serde_json;
use super::{kind::UndoType, properties::ActivityProperties, Activity};
use base::Base;
use error::{Error, Result};
use link::Link;
use object::{Object, ObjectProperties};
@ -45,6 +45,5 @@ impl Undo {
}
}
impl Base for Undo {}
impl Object for Undo {}
impl Activity for Undo {}

View file

@ -1,7 +1,7 @@
use serde_json;
use super::{kind::UpdateType, properties::ActivityProperties, Activity};
use base::Base;
use error::{Error, Result};
use link::Link;
use object::{Object, ObjectProperties};
@ -45,6 +45,5 @@ impl Update {
}
}
impl Base for Update {}
impl Object for Update {}
impl Activity for Update {}

View file

@ -1,7 +1,7 @@
use serde_json;
use super::{kind::ViewType, properties::ActivityProperties, Activity};
use base::Base;
use error::{Error, Result};
use link::Link;
use object::{Object, ObjectProperties};
@ -45,6 +45,5 @@ impl View {
}
}
impl Base for View {}
impl Object for View {}
impl Activity for View {}

View file

@ -1,4 +1,3 @@
use base::Base;
use object::{Object, ObjectProperties};
mod kind;
@ -15,7 +14,6 @@ pub struct Appliation {
pub object_props: ObjectProperties,
}
impl Base for Appliation {}
impl Object for Appliation {}
#[derive(Clone, Debug, Serialize, Deserialize)]
@ -27,7 +25,6 @@ pub struct Group {
pub object_props: ObjectProperties,
}
impl Base for Group {}
impl Object for Group {}
#[derive(Clone, Debug, Serialize, Deserialize)]
@ -39,7 +36,6 @@ pub struct Organization {
pub object_props: ObjectProperties,
}
impl Base for Organization {}
impl Object for Organization {}
#[derive(Clone, Debug, Serialize, Deserialize)]
@ -51,7 +47,6 @@ pub struct Person {
pub object_props: ObjectProperties,
}
impl Base for Person {}
impl Object for Person {}
#[derive(Clone, Debug, Serialize, Deserialize)]
@ -63,5 +58,4 @@ pub struct Service {
pub object_props: ObjectProperties,
}
impl Base for Service {}
impl Object for Service {}

View file

@ -1,6 +1,5 @@
use serde_json;
use base::Base;
use object::Object;
mod kind;
@ -20,7 +19,6 @@ pub struct Collection {
pub collection_props: CollectionProperties,
}
impl Base for Collection {}
impl Object for Collection {}
#[derive(Clone, Debug, Deserialize, Serialize)]
@ -35,7 +33,6 @@ pub struct OrderedCollection {
pub collection_props: CollectionProperties,
}
impl Base for OrderedCollection {}
impl Object for OrderedCollection {}
#[derive(Clone, Debug, Deserialize, Serialize)]
@ -52,7 +49,6 @@ pub struct CollectionPage {
pub collection_page_props: CollectionPageProperties,
}
impl Base for CollectionPage {}
impl Object for CollectionPage {}
#[derive(Clone, Debug, Deserialize, Serialize)]
@ -71,5 +67,4 @@ pub struct OrderedCollectionPage {
pub ordered_collection_page_props: OrderedCollectionPageProperties,
}
impl Base for OrderedCollectionPage {}
impl Object for OrderedCollectionPage {}

View file

@ -33,5 +33,4 @@ pub mod base;
pub mod collection;
pub mod error;
pub mod link;
pub mod location;
pub mod object;

View file

@ -1,11 +1,11 @@
use base::Base;
use serde::{de::DeserializeOwned, ser::Serialize};
mod kind;
mod properties;
pub use self::kind::*;
pub use self::properties::*;
pub trait Link: Base {}
pub trait Link: DeserializeOwned + Serialize {}
#[derive(Clone, Debug, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
@ -16,5 +16,4 @@ pub struct Mention {
pub link_props: LinkProperties,
}
impl Base for Mention {}
impl Link for Mention {}

View file

@ -1,3 +0,0 @@
use base::Base;
pub trait Location: Base {}

View file

@ -1,6 +1,6 @@
use serde::{de::DeserializeOwned, ser::Serialize};
use serde_json;
use base::Base;
use error::{Error, Result};
use link::Link;
@ -9,7 +9,7 @@ mod properties;
pub use self::kind::*;
pub use self::properties::*;
pub trait Object: Base {}
pub trait Object: DeserializeOwned + Serialize {}
#[derive(Clone, Debug, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
@ -20,7 +20,6 @@ pub struct Article {
pub object_props: ObjectProperties,
}
impl Base for Article {}
impl Object for Article {}
#[derive(Clone, Debug, Serialize, Deserialize)]
@ -32,7 +31,6 @@ pub struct Audio {
pub object_props: ObjectProperties,
}
impl Base for Audio {}
impl Object for Audio {}
#[derive(Clone, Debug, Serialize, Deserialize)]
@ -44,7 +42,6 @@ pub struct Document {
pub object_props: ObjectProperties,
}
impl Base for Document {}
impl Object for Document {}
#[derive(Clone, Debug, Serialize, Deserialize)]
@ -56,7 +53,6 @@ pub struct Event {
pub object_props: ObjectProperties,
}
impl Base for Event {}
impl Object for Event {}
#[derive(Clone, Debug, Serialize, Deserialize)]
@ -68,7 +64,6 @@ pub struct Image {
pub object_props: ObjectProperties,
}
impl Base for Image {}
impl Object for Image {}
#[derive(Clone, Debug, Serialize, Deserialize)]
@ -80,7 +75,6 @@ pub struct Note {
pub object_props: ObjectProperties,
}
impl Base for Note {}
impl Object for Note {}
#[derive(Clone, Debug, Serialize, Deserialize)]
@ -92,7 +86,6 @@ pub struct Page {
pub object_props: ObjectProperties,
}
impl Base for Page {}
impl Object for Page {}
#[derive(Clone, Debug, Serialize, Deserialize)]
@ -106,7 +99,6 @@ pub struct Place {
pub place: PlaceProperties,
}
impl Base for Place {}
impl Object for Place {}
#[derive(Clone, Debug, Serialize, Deserialize)]
@ -125,7 +117,6 @@ impl Profile {
}
}
impl Base for Profile {}
impl Object for Profile {}
#[derive(Clone, Debug, Serialize, Deserialize)]
@ -166,7 +157,6 @@ impl Relationship {
}
}
impl Base for Relationship {}
impl Object for Relationship {}
#[derive(Clone, Debug, Serialize, Deserialize)]
@ -180,7 +170,6 @@ pub struct Tombstone {
pub tombstone_props: TombstoneProperties,
}
impl Base for Tombstone {}
impl Object for Tombstone {}
#[derive(Clone, Debug, Serialize, Deserialize)]
@ -192,5 +181,4 @@ pub struct Video {
pub object_props: ObjectProperties,
}
impl Base for Video {}
impl Object for Video {}