mirror of
https://github.com/fluencelabs/sqlite-wasm-connector
synced 2025-03-15 06:20:50 +00:00
Fix the lifetime binding of Database::open
This commit is contained in:
parent
c0c44e67b8
commit
2cdf79bca0
@ -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"
|
||||
|
@ -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));
|
||||
|
@ -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)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user