r2d2_diesel is included in diesel since 1.1, so we don't need the dependencies directly.

Same thing with time, included in chrono
This commit is contained in:
Daniel García 2018-03-07 18:41:34 +01:00
parent 1277cb099d
commit 66097e5f12
5 changed files with 7 additions and 26 deletions

14
Cargo.lock generated
View File

@ -79,8 +79,6 @@ dependencies = [
"lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"multipart 0.14.2 (registry+https://github.com/rust-lang/crates.io-index)",
"oath 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)",
"r2d2 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
"r2d2-diesel 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"reqwest 0.8.5 (registry+https://github.com/rust-lang/crates.io-index)",
"ring 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rocket 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
@ -89,7 +87,6 @@ dependencies = [
"serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)",
"uuid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
@ -263,6 +260,7 @@ dependencies = [
"chrono 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"diesel_derives 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libsqlite3-sys 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
"r2d2 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@ -1025,15 +1023,6 @@ dependencies = [
"scheduled-thread-pool 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "r2d2-diesel"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"diesel 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"r2d2 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "rand"
version = "0.3.22"
@ -1855,7 +1844,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum quick-error 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "eda5fe9b71976e62bc81b781206aaa076401769b2143379d3eb2118388babac4"
"checksum quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a"
"checksum r2d2 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f9078ca6a8a5568ed142083bb2f7dc9295b69d16f867ddcc9849e51b17d8db46"
"checksum r2d2-diesel 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "eb9c29bad92da76d02bc2c020452ebc3a3fe6fa74cfab91e711c43116e4fb1a3"
"checksum rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)" = "15a732abf9d20f0ad8eeb6f909bf6868722d9a06e1e50802b6a70351f40b4eb1"
"checksum rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "eba5f8cb59cc50ed56be8880a5c7b496bfd9bd26394e176bc67884094145c2c5"
"checksum rayon 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a77c51c07654ddd93f6cb543c7a849863b03abc7e82591afda6dc8ad4ac3ac4a"

View File

@ -21,14 +21,11 @@ serde_derive = "1.0.27"
serde_json = "1.0.10"
# A safe, extensible ORM and Query builder
# If tables need more than 16 columns, add feature "large-tables"
diesel = { version = "1.1.1", features = ["sqlite", "chrono", "large-tables"] }
# "large-tables" is needed for tables with more than 16 columns, the next version of diesel will
# default to 32 column tables by default and deprecate large-tables, so remove this when updating
diesel = { version = "1.1.1", features = ["sqlite", "chrono", "r2d2", "large-tables"] }
diesel_migrations = { version = "1.1.0", features = ["sqlite"] }
# A generic connection pool
r2d2 = "0.8.2"
r2d2-diesel = "1.0.0"
# Crypto library
ring = { version = "0.11.0", features = ["rsa_signing"] }
@ -37,7 +34,6 @@ uuid = { version = "0.6.1", features = ["v4"] }
# Date and time library for Rust
chrono = "0.4.0"
time = "0.1.39"
# TOTP library
oath = "0.10.2"

View File

@ -3,7 +3,7 @@
///
use util::read_file;
use time::Duration;
use chrono::Duration;
use jwt;
use serde::ser::Serialize;

View File

@ -2,8 +2,8 @@ use std::ops::Deref;
use diesel::{Connection as DieselConnection, ConnectionError};
use diesel::sqlite::SqliteConnection;
use r2d2;
use r2d2_diesel::ConnectionManager;
use diesel::r2d2;
use diesel::r2d2::ConnectionManager;
use rocket::http::Status;
use rocket::request::{self, FromRequest};

View File

@ -16,12 +16,9 @@ extern crate serde_json;
extern crate diesel;
#[macro_use]
extern crate diesel_migrations;
extern crate r2d2_diesel;
extern crate r2d2;
extern crate ring;
extern crate uuid;
extern crate chrono;
extern crate time;
extern crate oath;
extern crate data_encoding;
extern crate jsonwebtoken as jwt;