trim away repeated separators (i.e., empty components) on the right
(&mut self)
| 811 | |
| 812 | // trim away repeated separators (i.e., empty components) on the right |
| 813 | fn trim_right(&mut self) { |
| 814 | while self.path.len() > self.len_before_body() { |
| 815 | let (size, comp) = self.parse_next_component_back(); |
| 816 | if comp.is_some() { |
| 817 | return; |
| 818 | } else { |
| 819 | self.path = &self.path[..self.path.len() - size]; |
| 820 | } |
| 821 | } |
| 822 | } |
| 823 | } |
| 824 | |
| 825 | impl<'a> Iterator for Components<'a> { |
no test coverage detected