Merge pull request #1269 from gwenn/build_error

Fix build error
This commit is contained in:
gwenn 2022-12-13 21:10:47 +01:00 committed by GitHub
commit 646c9c122b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -949,12 +949,10 @@ impl Connection {
/// and owned by the caller, e.g. as a result of calling ffi::sqlite3_open(). /// and owned by the caller, e.g. as a result of calling ffi::sqlite3_open().
#[inline] #[inline]
pub unsafe fn from_handle_owned(db: *mut ffi::sqlite3) -> Result<Connection> { pub unsafe fn from_handle_owned(db: *mut ffi::sqlite3) -> Result<Connection> {
let db_path = db_filename(db);
let db = InnerConnection::new(db, true); let db = InnerConnection::new(db, true);
Ok(Connection { Ok(Connection {
db: RefCell::new(db), db: RefCell::new(db),
cache: StatementCache::with_capacity(STATEMENT_CACHE_DEFAULT_CAPACITY), cache: StatementCache::with_capacity(STATEMENT_CACHE_DEFAULT_CAPACITY),
path: db_path,
}) })
} }