diff --git a/Cargo.toml b/Cargo.toml index f72ba7f..c1600e9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sqlite" -version = "0.2.1" +version = "0.2.2" authors = ["Ivan Ukhov "] license = "MIT" repository = "https://github.com/stainless-steel/sqlite" diff --git a/src/database.rs b/src/database.rs index 59c3d90..74168c9 100644 --- a/src/database.rs +++ b/src/database.rs @@ -16,7 +16,7 @@ pub type ExecuteCallback<'l> = FnMut(Vec<(String, String)>) -> bool + 'l; impl<'l> Database<'l> { /// Open a database. - pub fn open(path: &Path) -> Result { + pub fn open(path: &Path) -> Result> { let mut raw = 0 as *mut _; unsafe { success!(raw::sqlite3_open(path_to_c_str!(path), &mut raw)); diff --git a/src/lib.rs b/src/lib.rs index 28b838f..a34c6ab 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -65,6 +65,6 @@ pub use statement::{Statement, Binding, Value}; /// Open a database. #[inline] -pub fn open(path: &std::path::Path) -> Result { +pub fn open<'l>(path: &std::path::Path) -> Result> { Database::open(path) }