libsql
libsql copied to clipboard
Fix a windows incompatibility in connection.rs libsql-sys.
#[cfg(not(target_os = "windows"))]
use std::os::unix::ffi::OsStrExt;
#[cfg(target_os = "windows")]
use std::os::windows::ffi::OsStrExt;
#[cfg(not(feature = "rusqlite"))]
let conn = unsafe {
#[cfg(target_os = "windows")]
let path = std::ffi::CString::new(path.as_ref().as_os_str().as_encoded_bytes())
.map_err(|_| crate::error::Error::Bug("invalid database path"))?;
#[cfg(not(target_os = "windows"))]
let path = std::ffi::CString::new(path.as_ref().as_os_str().as_bytes())
.map_err(|_| crate::error::Error::Bug("invalid database path"))?;
needs rustfmt for CI to pass
needs rustfmt for CI to pass
I am sorry, I am very new to commiting, what should I do? Run rustfmt and re-submit a pull request?
You can run cargo fmt it should do the trick
This pull request has not been updated for months so closing as stale.