From 341add84dcb7bff9d3b2597d83f9163038cc0a92 Mon Sep 17 00:00:00 2001 From: jakka Date: Thu, 19 Jun 2025 23:33:17 +0300 Subject: removed failing db file check. readded test compile config --- src/db.rs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/db.rs') diff --git a/src/db.rs b/src/db.rs index 6622010..7ca313b 100644 --- a/src/db.rs +++ b/src/db.rs @@ -26,14 +26,10 @@ pub struct Database(pub Connection); impl Database { pub async fn new(path: impl AsRef) -> Result { - if path.as_ref().is_file() { - let conn = Builder::new_local(path).build().await?.connect()?; - conn.execute(TABLE_CREATE, ()).await?; + let conn = Builder::new_local(path).build().await?.connect()?; + conn.execute(TABLE_CREATE, ()).await?; - Ok(Database(conn)) - } else { - Err(anyhow!("Not a file")) - } + Ok(Database(conn)) } pub async fn insert_file(&self, filename: impl AsRef) -> Result<()> { -- cgit v1.3.1