parse a component from the left, saying how many bytes to consume to remove the component
(&self)
| 777 | // parse a component from the left, saying how many bytes to consume to |
| 778 | // remove the component |
| 779 | fn parse_next_component(&self) -> (usize, Option<Component<'a>>) { |
| 780 | debug_assert!(self.front == State::Body); |
| 781 | let (extra, comp) = match self.path.iter().position(|b| self.is_sep_byte(*b)) { |
| 782 | None => (0, self.path), |
| 783 | Some(i) => (1, &self.path[..i]), |
| 784 | }; |
| 785 | (comp.len() + extra, self.parse_single_component(comp)) |
| 786 | } |
| 787 | |
| 788 | // parse a component from the right, saying how many bytes to consume to |
| 789 | // remove the component |
no test coverage detected