Skip to content

Commit a060476

Browse files
authored
Fix Windows compilation in libsql-sys (#2184)
This occurs on the latest released version 0.9.24 : ``` error[E0599]: no method named `to_str` found for type parameter `impl AsRef<Path>` in the current scope Error: --> C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\libsql-sys-0.9.24\src\connection.rs:287:18 | 200 | path: impl AsRef<Path>, | ---------------- method `to_str` not found for this type parameter ... 286 | let path = path | ________________________- 287 | | .to_str() | | -^^^^^^ method not found in `impl AsRef<Path>` | |_________________| | For more information about this error, try `rustc --explain E0599`. error: could not compile `libsql-sys` (lib) due to 1 previous error ```
2 parents 020168a + 98a2299 commit a060476

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

libsql-sys/src/connection.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,7 @@ impl<W: Wal> Connection<W> {
284284
};
285285
#[cfg(not(unix))]
286286
let path = path
287+
.as_ref()
287288
.to_str()
288289
.ok_or_else(|| crate::error::Error::Bug("database path is not valid unicode"))
289290
.and_then(|x| {

0 commit comments

Comments
 (0)