mirror of
https://github.com/isar/rusqlite.git
synced 2025-02-08 15:28:21 +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 {
|
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.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user