Silence some warnings

This commit is contained in:
Magnus Hoff 2017-09-08 14:43:47 +02:00
parent 64737b44e5
commit 6f94b2f960
2 changed files with 3 additions and 11 deletions

View file

@ -1,3 +1,6 @@
// #[derive(BartDisplay)] can cause unused extern crates warning:
#![allow(unused_extern_crates)]
use std::fmt;
use futures::{self, Future};

View file

@ -1,6 +1,5 @@
use std;
use chrono;
use diesel;
use diesel::sqlite::SqliteConnection;
use diesel::prelude::*;
@ -21,16 +20,6 @@ impl State {
State { connection_pool }
}
pub fn get_article_revision_by_slug(&self, slug: &str) -> Result<Option<models::ArticleRevision>, Error> {
Ok(Some(models::ArticleRevision {
article_id: 0,
revision: 0,
created: chrono::Local::now().naive_local(),
title: slug.to_owned(),
body: "Look at me!".to_owned(),
}))
}
pub fn get_article_revision_by_id(&self, article_id: i32) -> Result<Option<models::ArticleRevision>, Error> {
use schema::article_revisions;