Fix a few warnings

This commit is contained in:
Bat 2018-04-29 19:06:10 +01:00
parent 80472506ca
commit dd9e845e66
4 changed files with 4 additions and 8 deletions

View File

@ -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<T, U> {
Create {
by: by,

View File

@ -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.)

View File

@ -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<ConnectionManager<PgConnection>>;
/// Initializes a database pool.

View File

@ -72,7 +72,7 @@ impl Blog {
Outbox::new(self.compute_outbox(conn), self.get_activities(conn))
}
fn get_activities(&self, conn: &PgConnection) -> Vec<Activity> {
fn get_activities(&self, _conn: &PgConnection) -> Vec<Activity> {
vec![]
}
}