1
0
mirror of https://github.com/fafhrd91/actix-web synced 2024-12-18 01:43:58 +01:00

only use diesel::r2d2 feature. no need r2d2_diesel create

This commit is contained in:
krircc 2018-04-03 22:37:53 +08:00
parent 2a269f1111
commit 56a31ea0ee
3 changed files with 3 additions and 6 deletions

View File

@ -15,7 +15,6 @@ serde = "1.0"
serde_json = "1.0" serde_json = "1.0"
serde_derive = "1.0" serde_derive = "1.0"
diesel = { version = "1.0", features = ["sqlite"] } diesel = { version = "^1.1.0", features = ["sqlite", "r2d2"] }
r2d2 = "0.8" r2d2 = "0.8"
r2d2-diesel = "1.0"
dotenv = "0.10" dotenv = "0.10"

View File

@ -4,8 +4,7 @@ use diesel;
use actix_web::*; use actix_web::*;
use actix::prelude::*; use actix::prelude::*;
use diesel::prelude::*; use diesel::prelude::*;
use r2d2::Pool; use diesel::r2d2::{ Pool, ConnectionManager };
use r2d2_diesel::ConnectionManager;
use models; use models;
use schema; use schema;

View File

@ -11,7 +11,6 @@ extern crate serde_derive;
#[macro_use] #[macro_use]
extern crate diesel; extern crate diesel;
extern crate r2d2; extern crate r2d2;
extern crate r2d2_diesel;
extern crate uuid; extern crate uuid;
extern crate futures; extern crate futures;
extern crate actix; extern crate actix;
@ -23,7 +22,7 @@ use actix_web::{http, server, middleware,
App, Path, State, HttpResponse, AsyncResponder, FutureResponse}; App, Path, State, HttpResponse, AsyncResponder, FutureResponse};
use diesel::prelude::*; use diesel::prelude::*;
use r2d2_diesel::ConnectionManager; use diesel::r2d2::{ Pool, ConnectionManager };
use futures::future::Future; use futures::future::Future;
mod db; mod db;