Get rest of path

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();;
let rest = it.as_path();

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

1 Like