Expand description
Similar to try_from_bstr()
, but panics if malformed surrogates are encountered on windows.
190
191
192
193
194
195
196
197
198
199
pub fn to_native_path_on_windows<'a>(path: impl Into<Cow<'a, BStr>>) -> Cow<'a, std::path::Path> {
#[cfg(not(windows))]
{
crate::from_bstr(path)
}
#[cfg(windows)]
{
crate::from_bstr(to_windows_separators(path))
}
}