1 2 3 4 5 6
pub fn split_segments(path: &str) -> Vec<&str> { path.trim_matches('/') .split('/') .filter(|segment| !segment.is_empty()) .collect() }