Fix the lifetime binding of Database::open

This commit is contained in:
Ivan Ukhov 2015-06-01 11:23:02 -04:00
parent c0c44e67b8
commit 2cdf79bca0
3 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
[package]
name = "sqlite"
version = "0.2.1"
version = "0.2.2"
authors = ["Ivan Ukhov <ivan.ukhov@gmail.com>"]
license = "MIT"
repository = "https://github.com/stainless-steel/sqlite"

View File

@ -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<Database> {
pub fn open(path: &Path) -> Result<Database<'l>> {
let mut raw = 0 as *mut _;
unsafe {
success!(raw::sqlite3_open(path_to_c_str!(path), &mut raw));

View File

@ -65,6 +65,6 @@ pub use statement::{Statement, Binding, Value};
/// Open a database.
#[inline]
pub fn open(path: &std::path::Path) -> Result<Database> {
pub fn open<'l>(path: &std::path::Path) -> Result<Database<'l>> {
Database::open(path)
}