1/// Get the final component of a path-like value. 2pub fn final_component(path_ish: &str) -> &str { 3 match path_ish.rsplit_once('/') { 4 Some((_left, right)) => right, 5 None => path_ish, 6 } 7}