mirror of
https://github.com/isar/rusqlite.git
synced 2025-08-21 21:59:29 +08:00
add cfg for test
This commit is contained in:
@@ -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.
|
||||
|
Reference in New Issue
Block a user