Remove some unused #[derive] (#473)
We used to need them, probably when we were using Tera.
This commit is contained in:
@@ -18,7 +18,6 @@ rocket = "0.4.0"
|
||||
reqwest = "0.9"
|
||||
scheduled-thread-pool = "0.2.0"
|
||||
serde = "1.0"
|
||||
serde_derive = "1.0"
|
||||
serde_json = "1.0"
|
||||
tantivy = "0.8.2"
|
||||
url = "1.7"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use activitypub::{actor::Group, collection::OrderedCollection, Actor, CustomObject, Object};
|
||||
use activitypub::{actor::Group, collection::OrderedCollection, CustomObject};
|
||||
use chrono::NaiveDateTime;
|
||||
use diesel::{self, ExpressionMethods, QueryDsl, RunQueryDsl, SaveChangesDsl};
|
||||
use openssl::{
|
||||
@@ -30,7 +30,7 @@ use {Connection, BASE_URL, USE_HTTPS, Error, Result};
|
||||
|
||||
pub type CustomGroup = CustomObject<ApSignature, Group>;
|
||||
|
||||
#[derive(Queryable, Identifiable, Serialize, Deserialize, Clone, AsChangeset)]
|
||||
#[derive(Queryable, Identifiable, Clone, AsChangeset)]
|
||||
pub struct Blog {
|
||||
pub id: i32,
|
||||
pub actor_id: String,
|
||||
@@ -363,9 +363,6 @@ impl IntoId for Blog {
|
||||
}
|
||||
}
|
||||
|
||||
impl Object for Blog {}
|
||||
impl Actor for Blog {}
|
||||
|
||||
impl WithInbox for Blog {
|
||||
fn get_inbox_url(&self) -> String {
|
||||
self.inbox_url.clone()
|
||||
|
||||
@@ -5,7 +5,7 @@ use schema::comment_seers;
|
||||
use users::User;
|
||||
use {Connection, Error, Result};
|
||||
|
||||
#[derive(Queryable, Serialize, Clone)]
|
||||
#[derive(Queryable, Clone)]
|
||||
pub struct CommentSeers {
|
||||
pub id: i32,
|
||||
pub comment_id: i32,
|
||||
|
||||
@@ -20,7 +20,7 @@ use schema::comments;
|
||||
use users::User;
|
||||
use {Connection, Error, Result};
|
||||
|
||||
#[derive(Queryable, Identifiable, Serialize, Clone, AsChangeset)]
|
||||
#[derive(Queryable, Identifiable, Clone, AsChangeset)]
|
||||
pub struct Comment {
|
||||
pub id: i32,
|
||||
pub content: SafeString,
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
use activitypub::{
|
||||
activity::{Accept, Follow as FollowAct, Undo},
|
||||
actor::Person,
|
||||
Actor,
|
||||
};
|
||||
use diesel::{self, ExpressionMethods, QueryDsl, RunQueryDsl, SaveChangesDsl};
|
||||
|
||||
@@ -74,7 +73,7 @@ impl Follow {
|
||||
|
||||
/// from -> The one sending the follow request
|
||||
/// target -> The target of the request, responding with Accept
|
||||
pub fn accept_follow<A: Signer + IntoId + Clone, B: Clone + WithInbox + Actor + IntoId>(
|
||||
pub fn accept_follow<A: Signer + IntoId + Clone, B: Clone + WithInbox + IntoId>(
|
||||
conn: &Connection,
|
||||
from: &B,
|
||||
target: &A,
|
||||
|
||||
@@ -9,7 +9,7 @@ use schema::{instances, users};
|
||||
use users::User;
|
||||
use {Connection, Error, Result};
|
||||
|
||||
#[derive(Clone, Identifiable, Queryable, Serialize)]
|
||||
#[derive(Clone, Identifiable, Queryable)]
|
||||
pub struct Instance {
|
||||
pub id: i32,
|
||||
pub public_domain: String,
|
||||
|
||||
@@ -21,8 +21,6 @@ extern crate rocket;
|
||||
extern crate scheduled_thread_pool;
|
||||
extern crate serde;
|
||||
#[macro_use]
|
||||
extern crate serde_derive;
|
||||
#[macro_use]
|
||||
extern crate serde_json;
|
||||
#[macro_use]
|
||||
extern crate tantivy;
|
||||
|
||||
@@ -13,7 +13,7 @@ use schema::medias;
|
||||
use users::User;
|
||||
use {ap_url, Connection, Error, Result};
|
||||
|
||||
#[derive(Clone, Identifiable, Queryable, Serialize)]
|
||||
#[derive(Clone, Identifiable, Queryable)]
|
||||
pub struct Media {
|
||||
pub id: i32,
|
||||
pub file_path: String,
|
||||
|
||||
@@ -9,7 +9,7 @@ use schema::mentions;
|
||||
use users::User;
|
||||
use {Connection, Error, Result};
|
||||
|
||||
#[derive(Clone, Queryable, Identifiable, Serialize, Deserialize)]
|
||||
#[derive(Clone, Queryable, Identifiable)]
|
||||
pub struct Mention {
|
||||
pub id: i32,
|
||||
pub mentioned_id: i32,
|
||||
|
||||
@@ -19,7 +19,7 @@ pub mod notification_kind {
|
||||
pub const RESHARE: &str = "RESHARE";
|
||||
}
|
||||
|
||||
#[derive(Clone, Queryable, Identifiable, Serialize)]
|
||||
#[derive(Clone, Queryable, Identifiable)]
|
||||
pub struct Notification {
|
||||
pub id: i32,
|
||||
pub user_id: i32,
|
||||
|
||||
@@ -34,7 +34,7 @@ use {ap_url, Connection, BASE_URL, Error, Result, ApiResult};
|
||||
|
||||
pub type LicensedArticle = CustomObject<Licensed, Article>;
|
||||
|
||||
#[derive(Queryable, Identifiable, Serialize, Clone, AsChangeset)]
|
||||
#[derive(Queryable, Identifiable, Clone, AsChangeset)]
|
||||
#[changeset_options(treat_none_as_null = "true")]
|
||||
pub struct Post {
|
||||
pub id: i32,
|
||||
|
||||
@@ -12,7 +12,7 @@ use schema::reshares;
|
||||
use users::User;
|
||||
use {Connection, Error, Result};
|
||||
|
||||
#[derive(Clone, Serialize, Deserialize, Queryable, Identifiable)]
|
||||
#[derive(Clone, Queryable, Identifiable)]
|
||||
pub struct Reshare {
|
||||
pub id: i32,
|
||||
pub user_id: i32,
|
||||
|
||||
@@ -5,7 +5,7 @@ use plume_common::activity_pub::Hashtag;
|
||||
use schema::tags;
|
||||
use {ap_url, Connection, Error, Result};
|
||||
|
||||
#[derive(Clone, Identifiable, Serialize, Queryable)]
|
||||
#[derive(Clone, Identifiable, Queryable)]
|
||||
pub struct Tag {
|
||||
pub id: i32,
|
||||
pub tag: String,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use activitypub::{
|
||||
actor::Person, collection::OrderedCollection, object::Image, Activity, Actor, CustomObject,
|
||||
Endpoint, Object,
|
||||
actor::Person, collection::OrderedCollection, object::Image, Activity, CustomObject,
|
||||
Endpoint,
|
||||
};
|
||||
use bcrypt;
|
||||
use chrono::{NaiveDateTime, Utc};
|
||||
@@ -44,7 +44,7 @@ use {ap_url, Connection, BASE_URL, USE_HTTPS, Error, Result};
|
||||
|
||||
pub type CustomPerson = CustomObject<ApSignature, Person>;
|
||||
|
||||
#[derive(Queryable, Identifiable, Serialize, Deserialize, Clone, Debug, AsChangeset)]
|
||||
#[derive(Queryable, Identifiable, Clone, Debug, AsChangeset)]
|
||||
pub struct User {
|
||||
pub id: i32,
|
||||
pub username: String,
|
||||
@@ -829,8 +829,6 @@ impl IntoId for User {
|
||||
}
|
||||
|
||||
impl Eq for User {}
|
||||
impl Object for User {}
|
||||
impl Actor for User {}
|
||||
|
||||
impl WithInbox for User {
|
||||
fn get_inbox_url(&self) -> String {
|
||||
|
||||
Reference in New Issue
Block a user