diff --git a/src/activity_pub/activity.rs b/src/activity_pub/activity.rs index 098c4bc0..458cc2f0 100644 --- a/src/activity_pub/activity.rs +++ b/src/activity_pub/activity.rs @@ -11,12 +11,14 @@ impl Activity { } } +#[allow(dead_code)] pub struct Create<'a, T, U> where T: Actor + 'static, U: Object { by: &'a T, object: U } impl<'a, T: Actor, U: Object> Create<'a, T, U> { + #[allow(dead_code)] pub fn new(by: &T, obj: U) -> Create { Create { by: by, diff --git a/src/activity_pub/sign.rs b/src/activity_pub/sign.rs index c1df72f0..54bb5d32 100644 --- a/src/activity_pub/sign.rs +++ b/src/activity_pub/sign.rs @@ -1,7 +1,7 @@ use base64; use hex; use chrono::Utc; -use openssl::sha::{sha256, sha512}; +use openssl::sha::sha256; use serde_json; // (Comments are from the Mastodon source code, to remember what to do.) diff --git a/src/main.rs b/src/main.rs index b70d8aee..09af3529 100644 --- a/src/main.rs +++ b/src/main.rs @@ -12,11 +12,8 @@ extern crate dotenv; extern crate openssl; extern crate rocket; extern crate rocket_contrib; -#[feature(custom_attribute)] extern crate serde; #[macro_use] -extern crate serde_derive; -#[macro_use] extern crate serde_json; use diesel::pg::PgConnection; @@ -32,9 +29,6 @@ mod schema; mod routes; mod utils; -use db_conn::DbConn; -use models::instance::*; - type PgPool = Pool>; /// Initializes a database pool. diff --git a/src/models/blogs.rs b/src/models/blogs.rs index 24ae6e00..fd247baa 100644 --- a/src/models/blogs.rs +++ b/src/models/blogs.rs @@ -72,7 +72,7 @@ impl Blog { Outbox::new(self.compute_outbox(conn), self.get_activities(conn)) } - fn get_activities(&self, conn: &PgConnection) -> Vec { + fn get_activities(&self, _conn: &PgConnection) -> Vec { vec![] } }