mirror of
https://github.com/isar/rusqlite.git
synced 2025-08-21 05:41:06 +08:00
add cfg for test
This commit is contained in:
@@ -871,10 +871,15 @@ impl InnerConnection {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Drop for InnerConnection {
|
impl Drop for InnerConnection {
|
||||||
|
#[cfg(not(test))]
|
||||||
#[allow(unused_must_use)]
|
#[allow(unused_must_use)]
|
||||||
fn drop(&mut self) {
|
fn drop(&mut self) {
|
||||||
self.close();
|
self.close();
|
||||||
}
|
}
|
||||||
|
#[cfg(test)]
|
||||||
|
fn drop(&mut self) {
|
||||||
|
self.close().expect("Error while closing SQLite connection");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Old name for `Statement`. `SqliteStatement` is deprecated.
|
/// Old name for `Statement`. `SqliteStatement` is deprecated.
|
||||||
|
Reference in New Issue
Block a user