git_prole/
final_component.rs

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