Skip to content

Commit 532d087

Browse files
spigazhaaawk
authored andcommitted
libsql-sys: Removed unused import and fixed path.
1 parent 1eaa283 commit 532d087

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

libsql-sys/src/connection.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,7 @@ impl<W: Wal> Connection<W> {
273273

274274
#[cfg(not(feature = "rusqlite"))]
275275
let conn = unsafe {
276-
use std::os::unix::ffi::OsStrExt;
277-
let path = std::ffi::CString::new(path.as_ref().as_os_str().as_bytes())
276+
let path = std::ffi::CString::new(path.as_ref().as_os_str().as_encoded_bytes())
278277
.map_err(|_| crate::error::Error::Bug("invalid database path"))?;
279278
let mut conn: *mut crate::ffi::sqlite3 = std::ptr::null_mut();
280279
// We pass a pointer to the WAL methods data to the database connection. This means

0 commit comments

Comments
 (0)