From 67c0c156cc42f32a35c1815c39762b841cab4ea7 Mon Sep 17 00:00:00 2001 From: august kline Date: Thu, 14 Nov 2024 11:34:57 -0500 Subject: [PATCH] Fix memory db closing --- src/lib.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index a215c4d..5f96fd4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -49,13 +49,13 @@ impl BlogDb { .journal_mode(SqliteJournalMode::Wal), ) .await?; - #[cfg(debug_assertions)] - { - let db_name = CACHE_URL.strip_prefix("sqlite://").unwrap(); - if File::open(db_name).is_err() { - let _ = File::create_new(db_name); - } + // #[cfg(debug_assertions)] + // { + let db_name = CACHE_URL.strip_prefix("sqlite://").unwrap(); + if File::open(db_name).is_err() { + let _ = File::create_new(db_name); } + // } let memory = SqlitePoolOptions::new() .min_connections(1) .connect_with(