Skip to content

Commit a544730

Browse files
committed
bugfix for 'std' and windows platform interaction
1 parent 74c0910 commit a544730

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

url/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2883,9 +2883,9 @@ fn path_to_file_url_segments(
28832883
Ok((host_end, HostInternal::None))
28842884
}
28852885

2886-
#[cfg(windows)]
2886+
#[cfg(all(feature = "std", windows))]
28872887
fn path_to_file_url_segments(
2888-
path: &Path,
2888+
path: &std::path::Path,
28892889
serialization: &mut String,
28902890
) -> Result<(u32, HostInternal), ()> {
28912891
path_to_file_url_segments_windows(path, serialization)
@@ -3002,11 +3002,11 @@ fn file_url_segments_to_pathbuf(
30023002
Ok(path)
30033003
}
30043004

3005-
#[cfg(windows)]
3005+
#[cfg(all(feature = "std", windows))]
30063006
fn file_url_segments_to_pathbuf(
30073007
host: Option<&str>,
30083008
segments: str::Split<char>,
3009-
) -> Result<PathBuf, ()> {
3009+
) -> Result<std::path::PathBuf, ()> {
30103010
file_url_segments_to_pathbuf_windows(host, segments)
30113011
}
30123012

0 commit comments

Comments
 (0)