I can check the first component of the path with path.iter().next()
, but how can I get all the components of the path after the first one as a new path?
1 Like
You need to store path.iter()
in a mutable binding, and call as_path()
after removing the first component:
let mut it = path.iter();
it.next();
let rest = it.as_path();
2 Likes
Ah, as_path
is what I was looking for. Thanks!
1 Like