File tree 2 files changed +1
-13
lines changed
2 files changed +1
-13
lines changed Original file line number Diff line number Diff line change @@ -13,11 +13,10 @@ reqwest = { version = "0.11", features = ["json"] }
13
13
tokio = { version = " 1.0" , features = [" macros" , " rt-multi-thread" ] }
14
14
tracing = " 0.1"
15
15
tracing-subscriber = { version = " 0.3" }
16
- diesel = { version = " 1.4.0" , features = [" postgres" , " r2d2 " ] }
16
+ diesel = { version = " 1.4.0" , features = [" postgres" ] }
17
17
diesel_migrations = { version = " 1.4.0" , features = [" postgres" ] }
18
18
serde = " 1.0"
19
19
serde_derive = " 1.0"
20
- lazy_static = " 1.4.0"
21
20
envy = " 0.4"
22
21
indexmap = " 1.6"
23
22
Original file line number Diff line number Diff line change 1
1
use crate :: Error ;
2
2
use diesel:: prelude:: * ;
3
- use diesel:: r2d2;
4
- use lazy_static:: lazy_static;
5
3
use tracing:: info;
6
4
7
- type Pool = r2d2:: Pool < r2d2:: ConnectionManager < PgConnection > > ;
8
-
9
- lazy_static ! {
10
- pub static ref DB : Pool = Pool :: new( r2d2:: ConnectionManager :: <PgConnection >:: new(
11
- & std:: env:: var( "DATABASE_URL" ) . expect( "DATABASE_URL not set" )
12
- ) )
13
- . expect( "Unable to connect to database" ) ;
14
- }
15
-
16
5
pub fn run_migrations ( ) -> Result < ( ) , Error > {
17
6
let conn = PgConnection :: establish ( & std:: env:: var ( "DATABASE_URL" ) ?) ?;
18
7
You can’t perform that action at this time.
0 commit comments