diff --git a/Cargo.toml b/Cargo.toml index adab821..8251b95 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sqlite" -version = "0.10.0" +version = "0.11.0" authors = ["Ivan Ukhov "] 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 = "*" diff --git a/src/database.rs b/src/database.rs index 77b363e..f03f6cb 100644 --- a/src/database.rs +++ b/src/database.rs @@ -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) {