diff --git a/src/db.rs b/src/db.rs index 367a942..194f2bb 100644 --- a/src/db.rs +++ b/src/db.rs @@ -22,11 +22,7 @@ pub async fn open>(path: T) -> Result { pub async fn new>(path: T) -> Result { std::fs::File::create_new(path.as_ref()).map_err(|e| e.to_string())?; - let db_url = format!("sqlite://{}", path.as_ref()); - - SqlitePool::connect(&db_url) - .await - .map_err(|e| e.to_string()) + open(path).await } pub async fn import_scripts(pool: &SqlitePool, scripts: Vec