mirror of
https://github.com/isar/rusqlite.git
synced 2025-02-01 16:00:50 +08:00
add cfg for test
This commit is contained in:
parent
bdd4f9a1a9
commit
0d1907887e
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user