Introduce the edge feature for backward compatibility

This commit is contained in:
Ivan Ukhov 2015-06-12 15:01:12 -04:00
parent 6d4454a6f5
commit a31345da43
2 changed files with 13 additions and 1 deletions

View File

@ -1,6 +1,6 @@
[package]
name = "sqlite"
version = "0.10.0"
version = "0.11.0"
authors = ["Ivan Ukhov <ivan.ukhov@gmail.com>"]
license = "MIT"
repository = "https://github.com/stainless-steel/sqlite"
@ -8,6 +8,9 @@ homepage = "https://github.com/stainless-steel/sqlite"
documentation = "https://stainless-steel.github.io/sqlite"
description = "The package provides an interface to SQLite."
[features]
edge = ["sqlite3-sys/edge"]
[dependencies]
libc = "*"
sqlite3-sys = "*"

View File

@ -99,6 +99,15 @@ impl<'l> Database<'l> {
}
impl<'l> Drop for Database<'l> {
#[cfg(not(feature = "edge"))]
#[inline]
#[allow(unused_must_use)]
fn drop(&mut self) {
self.remove_busy_handler();
unsafe { ffi::sqlite3_close(self.raw) };
}
#[cfg(feature = "edge")]
#[inline]
#[allow(unused_must_use)]
fn drop(&mut self) {