diff --git a/src/lib.rs b/src/lib.rs index aad1628..2f2e1cf 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -871,10 +871,15 @@ impl InnerConnection { } impl Drop for InnerConnection { + #[cfg(not(test))] #[allow(unused_must_use)] fn drop(&mut self) { self.close(); } + #[cfg(test)] + fn drop(&mut self) { + self.close().expect("Error while closing SQLite connection"); + } } /// Old name for `Statement`. `SqliteStatement` is deprecated.