Cleanup the id() method mess of the diesel models.

This commit is contained in:
Jordan Petridis
2018-01-13 07:46:56 +02:00
parent 6517956987
commit e4d77a6ba4
15 changed files with 21 additions and 31 deletions
-4
View File
@@ -13,9 +13,5 @@ reqwest = "0.8.2"
tempdir = "0.3.5"
glob = "0.2.11"
[dependencies.diesel]
features = ["sqlite"]
version = "1.0.0"
[dependencies.hammond-data]
path = "../hammond-data"
+1 -2
View File
@@ -219,7 +219,6 @@ mod tests {
use hammond_data::Source;
use hammond_data::feed::index;
use hammond_data::dbqueries;
use diesel::associations::Identifiable;
#[test]
// This test inserts an rss feed to your `XDG_DATA/hammond/hammond.db` so we make it explicit
@@ -231,7 +230,7 @@ mod tests {
// Create and index a source
let mut source = Source::from_url(url).unwrap();
// Copy it's id
let sid = source.id().clone();
let sid = source.id();
// Convert Source it into a Feed and index it
let feed = source.into_feed(true).unwrap();
-2
View File
@@ -1,4 +1,3 @@
use diesel::result;
use reqwest;
use hammond_data;
use std::io;
@@ -7,7 +6,6 @@ error_chain! {
foreign_links {
ReqError(reqwest::Error);
IoError(io::Error);
DieselResultError(result::Error);
DataError(hammond_data::errors::Error);
}
}
-1
View File
@@ -1,6 +1,5 @@
#![recursion_limit = "1024"]
extern crate diesel;
#[macro_use]
extern crate error_chain;
extern crate glob;