Expand description
Similar to try_into_bstr()
but panics if malformed surrogates are encountered on windows.
Examples found in repository?
src/spec.rs (line 41)
39 40 41 42 43 44 45 46 47 48 49 50 51 52
pub fn apply_prefix(&mut self, prefix: &std::path::Path) -> &Self {
// many more things we can't handle. `Path` never ends with trailing path separator.
let prefix = crate::into_bstr(prefix);
if !prefix.is_empty() {
let mut prefix = crate::to_unix_separators_on_windows(prefix);
{
let path = prefix.to_mut();
path.push_byte(b'/');
path.extend_from_slice(&self.0);
}
self.0 = prefix.into_owned();
}
self
}