Get rest of path


#1

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?


#2

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();

#3

Ah, as_path is what I was looking for. Thanks!