mirror of
https://github.com/fluencelabs/sqlite-wasm-connector
synced 2025-06-24 04:21:32 +00:00
Fix the lifetime binding of Database::open
This commit is contained in:
@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user