From bb5910a6ed2b4bd55b0cb9675a58de7c840fbcc9 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Mon, 10 May 2021 20:43:56 -0700 Subject: refactor(utils): remove unused, outdated db util closes #22 --- src/utils/db.rs | 20 -------------------- src/utils/mod.rs | 1 - 2 files changed, 21 deletions(-) delete mode 100644 src/utils/db.rs (limited to 'src/utils') diff --git a/src/utils/db.rs b/src/utils/db.rs deleted file mode 100644 index b74f88b..0000000 --- a/src/utils/db.rs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyleft (ɔ) 2021-2021 The Whirlsplash Collective -// SPDX-License-Identifier: GPL-3.0-only - -use std::error::Error; - -use sqlx::{sqlite::SqlitePoolOptions, SqlitePool}; - -pub async fn get_pool() -> Result> { - let pool = SqlitePoolOptions::new() - .max_connections(20) - .connect(&std::env::var("DATABASE_URL")?) - .await?; - - debug!( - "connected to database at url '{}'", - &std::env::var("DATABASE_URL")? - ); - - Ok(pool) -} diff --git a/src/utils/mod.rs b/src/utils/mod.rs index c188ccd..69c91d1 100644 --- a/src/utils/mod.rs +++ b/src/utils/mod.rs @@ -1,5 +1,4 @@ // Copyleft (ɔ) 2021-2021 The Whirlsplash Collective // SPDX-License-Identifier: GPL-3.0-only -// pub mod db; pub mod system; -- cgit v1.2.3