From 1bd738cd3eecb3040756ba2ded6d9dec455a98b4 Mon Sep 17 00:00:00 2001 From: abbycin Date: Sun, 12 Oct 2025 16:58:23 +0800 Subject: [PATCH] move drop(db) to the end --- src/main.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main.rs b/src/main.rs index f4a0f53..52b6854 100644 --- a/src/main.rs +++ b/src/main.rs @@ -106,7 +106,6 @@ fn main() { } }); pre_tx.commit().unwrap(); - drop(pre_tx); drop(db); // re-open db saved.tmp_store = true; @@ -177,9 +176,6 @@ fn main() { for x in h { x.join().unwrap(); } - drop(db); - #[cfg(feature = "custom_alloc")] - print_filtered_trace(|x, y| log::info!("{}{}", x, y)); let test_start = start_time.lock().unwrap(); let duration = test_start.elapsed(); @@ -214,4 +210,7 @@ fn main() { ops, duration.as_millis() ); + drop(db); + #[cfg(feature = "custom_alloc")] + print_filtered_trace(|x, y| log::info!("{}{}", x, y)); }