diff --git a/build.rs b/build.rs index 151bd668..e56fc559 100644 --- a/build.rs +++ b/build.rs @@ -1,5 +1,3 @@ -use rsass; - use ructe::Ructe; use std::process::{Command, Stdio}; use std::{ffi::OsStr, fs::*, io::Write, path::*}; diff --git a/plume-common/src/activity_pub/mod.rs b/plume-common/src/activity_pub/mod.rs index cb9d19db..ab5fc066 100644 --- a/plume-common/src/activity_pub/mod.rs +++ b/plume-common/src/activity_pub/mod.rs @@ -7,7 +7,6 @@ use rocket::{ response::{Responder, Response, Result}, Outcome, }; -use serde_json; use self::sign::Signable; diff --git a/plume-common/src/activity_pub/request.rs b/plume-common/src/activity_pub/request.rs index 795c7d11..29201180 100644 --- a/plume-common/src/activity_pub/request.rs +++ b/plume-common/src/activity_pub/request.rs @@ -1,4 +1,3 @@ -use base64; use chrono::{offset::Utc, DateTime}; use openssl::hash::{Hasher, MessageDigest}; use reqwest::header::{HeaderMap, HeaderValue, ACCEPT, CONTENT_TYPE, DATE, USER_AGENT}; diff --git a/plume-common/src/activity_pub/sign.rs b/plume-common/src/activity_pub/sign.rs index 745bb83f..496d4c6d 100644 --- a/plume-common/src/activity_pub/sign.rs +++ b/plume-common/src/activity_pub/sign.rs @@ -1,10 +1,7 @@ use super::request; -use base64; use chrono::{naive::NaiveDateTime, DateTime, Duration, Utc}; -use hex; use openssl::{pkey::PKey, rsa::Rsa, sha::sha256}; use rocket::http::HeaderMap; -use serde_json; /// Returns (public key, private key) pub fn gen_keypair() -> (Vec, Vec) { diff --git a/plume-models/src/blogs.rs b/plume-models/src/blogs.rs index 81c3d8fa..2999e31c 100644 --- a/plume-models/src/blogs.rs +++ b/plume-models/src/blogs.rs @@ -20,7 +20,6 @@ use plume_common::activity_pub::{ inbox::{AsActor, FromId}, sign, ActivityStream, ApSignature, Id, IntoId, PublicKey, Source, }; -use serde_json; use url::Url; use webfinger::*; diff --git a/plume-models/src/comments.rs b/plume-models/src/comments.rs index 99a68518..7bfc2ff3 100644 --- a/plume-models/src/comments.rs +++ b/plume-models/src/comments.rs @@ -25,7 +25,6 @@ use plume_common::{ }, utils, }; -use serde_json; use std::collections::HashSet; #[derive(Queryable, Identifiable, Clone, AsChangeset)] diff --git a/plume-models/src/inbox.rs b/plume-models/src/inbox.rs index 71bc5398..9229f0a4 100644 --- a/plume-models/src/inbox.rs +++ b/plume-models/src/inbox.rs @@ -1,5 +1,4 @@ use activitypub::activity::*; -use serde_json; use crate::{ comments::Comment, diff --git a/plume-models/src/lists.rs b/plume-models/src/lists.rs index 9ca125ce..c24fb5e5 100644 --- a/plume-models/src/lists.rs +++ b/plume-models/src/lists.rs @@ -7,8 +7,8 @@ use crate::{ use diesel::{self, ExpressionMethods, QueryDsl, RunQueryDsl}; use std::convert::{TryFrom, TryInto}; -/// Represent what a list is supposed to store. Represented in database as an integer #[derive(Copy, Clone, Debug, PartialEq, Eq)] +/// Represent what a list is supposed to store. Represented in database as an integer pub enum ListType { User, Blog, diff --git a/plume-models/src/medias.rs b/plume-models/src/medias.rs index c0c60aa8..e0480f4d 100644 --- a/plume-models/src/medias.rs +++ b/plume-models/src/medias.rs @@ -10,7 +10,6 @@ use plume_common::{ activity_pub::{inbox::FromId, Id}, utils::MediaProcessor, }; -use reqwest; use std::{fs, path::Path}; use tokio::prelude::*; diff --git a/plume-models/src/posts.rs b/plume-models/src/posts.rs index 2fcae95d..3a580a4c 100644 --- a/plume-models/src/posts.rs +++ b/plume-models/src/posts.rs @@ -19,7 +19,6 @@ use plume_common::{ }, utils::md_to_html, }; -use serde_json; use std::collections::HashSet; use tokio::runtime::Runtime; diff --git a/plume-models/src/users.rs b/plume-models/src/users.rs index 6f67a809..6135da86 100644 --- a/plume-models/src/users.rs +++ b/plume-models/src/users.rs @@ -11,7 +11,6 @@ use activitypub::{ object::{Image, Tombstone}, Activity, CustomObject, Endpoint, }; -use bcrypt; use chrono::{NaiveDateTime, Utc}; use diesel::{self, BelongingToDsl, ExpressionMethods, OptionalExtension, QueryDsl, RunQueryDsl}; use openssl::{ @@ -37,7 +36,6 @@ use rocket::{ outcome::IntoOutcome, request::{self, FromRequest, Request}, }; -use serde_json; use std::{ cmp::PartialEq, hash::{Hash, Hasher},