From 9c2cc12b0899d7fa3c066a82aaa2454afd51be69 Mon Sep 17 00:00:00 2001 From: Mark Hammond Date: Fri, 24 Feb 2023 15:13:25 +1100 Subject: [PATCH] No longer panic if we fail to close the connection when dropping it. --- src/inner_connection.rs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/inner_connection.rs b/src/inner_connection.rs index 92229ed..18ce3db 100644 --- a/src/inner_connection.rs +++ b/src/inner_connection.rs @@ -371,15 +371,7 @@ impl Drop for InnerConnection { #[allow(unused_must_use)] #[inline] fn drop(&mut self) { - use std::thread::panicking; - - if let Err(e) = self.close() { - if panicking() { - eprintln!("Error while closing SQLite connection: {e:?}"); - } else { - panic!("Error while closing SQLite connection: {:?}", e); - } - } + self.close(); } }