Function git_path::os_str_into_bstr

source ·
pub fn os_str_into_bstr(path: &OsStr) -> Result<&BStr, Utf8Error>
Expand description

Like into_bstr(), but takes OsStr as input for a lossless, but fallible, conversion.

Examples found in repository?
src/spec.rs (line 11)
10
11
12
13
14
15
    fn try_from(value: &OsStr) -> Result<Self, Self::Error> {
        crate::os_str_into_bstr(value).map(|value| {
            assert_valid_hack(value);
            Spec(value.into())
        })
    }