1
0
Fork 0

Improve code

This commit is contained in:
Alex Kotov 2020-10-15 04:01:29 +05:00
parent 86d026e702
commit be181b22cd
Signed by: kotovalexarian
GPG Key ID: 553C0EBBEB5D5F08
1 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,4 @@
use crate::config;
use crate::config::Config;
use diesel::pg::PgConnection;
use diesel::r2d2::ConnectionManager;
@ -34,7 +34,7 @@ impl Deref for DbConn {
}
}
pub fn create_db_pool(config: config::Config) -> DbPool {
pub fn create_db_pool(config: Config) -> DbPool {
let manager = ConnectionManager::<PgConnection>::new(config.database_url);
DbPool(Pool::new(manager).expect("Failed to create database pool"))