Function git_path::from_bstr

source ·
pub fn from_bstr<'a>(input: impl Into<Cow<'a, BStr>>) -> Cow<'a, Path>
Expand description

Similar to try_from_bstr(), but panics if malformed surrogates are encountered on windows.

Examples found in repository?
src/convert.rs (line 193)
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))
    }
}