From be181b22cd326d0514765754a966cbc18b52b2e4 Mon Sep 17 00:00:00 2001 From: Alex Kotov Date: Thu, 15 Oct 2020 04:01:29 +0500 Subject: [PATCH] Improve code --- src/database.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/database.rs b/src/database.rs index b7540e4..df39815 100644 --- a/src/database.rs +++ b/src/database.rs @@ -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::::new(config.database_url); DbPool(Pool::new(manager).expect("Failed to create database pool"))