mirror of
https://github.com/fluencelabs/sqlite-wasm-connector
synced 2025-06-18 01:31:22 +00:00
sqlite::open() takes an AsRef<Path> value
Now we can pass either a string or a Path to it, just like to std::fs::File::open().
This commit is contained in:
@ -99,7 +99,7 @@ pub type Result<T> = ::std::result::Result<T, Error>;
|
||||
|
||||
/// Open a connection to a new or existing database.
|
||||
#[inline]
|
||||
pub fn open<'l>(path: &std::path::Path) -> Result<Database<'l>> {
|
||||
pub fn open<'l, P: std::convert::AsRef<std::path::Path>>(path: P) -> Result<Database<'l>> {
|
||||
Database::open(path)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user