add cfg for test

This commit is contained in:
edelangh 2017-07-20 16:31:58 +02:00
parent bdd4f9a1a9
commit 0d1907887e

View File

@ -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.