Prefer empty OsStr over unsafe cast from [u8]
This commit is contained in:
parent
b1d6798899
commit
0281a05f66
1 changed files with 1 additions and 1 deletions
|
|
@ -50,7 +50,7 @@ pub fn parse_prefix(path: &OsStr) -> Option<Prefix<'_>> {
|
|||
Some((server, share)) => {
|
||||
(u8_slice_as_os_str(server), u8_slice_as_os_str(share))
|
||||
}
|
||||
None => (u8_slice_as_os_str(path), u8_slice_as_os_str(&[])),
|
||||
None => (u8_slice_as_os_str(path), OsStr::new("")),
|
||||
};
|
||||
return Some(VerbatimUNC(server, share));
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue