parse a given byte sequence into the corresponding path component
(&self, comp: &'b [u8])
| 764 | |
| 765 | // parse a given byte sequence into the corresponding path component |
| 766 | fn parse_single_component<'b>(&self, comp: &'b [u8]) -> Option<Component<'b>> { |
| 767 | match comp { |
| 768 | b"." => None, // . components are normalized away, except at |
| 769 | // the beginning of a path, which is treated |
| 770 | // separately via `include_cur_dir` |
| 771 | b".." => Some(Component::ParentDir), |
| 772 | b"" => None, |
| 773 | _ => Some(Component::Normal(unsafe { u8_slice_as_os_str(comp) })), |
| 774 | } |
| 775 | } |
| 776 | |
| 777 | // parse a component from the left, saying how many bytes to consume to |
| 778 | // remove the component |
no test coverage detected