shorten_location

Function shorten_location 

Source
pub fn shorten_location(s: &str) -> &str
Expand description

Intended for shortening the file field of Locations.

If this finds “/.cargo/registry/src/”, it truncates that and all previous characters, and the following “/” group if it exists (it is alternately configured to do this with “\” on Windows). For example, “/home/admin/. cargo/registry/src/index.crates.io-6f17d22bba15001f/ super_orchestrator-0.5. 1/src/misc.rs” gets truncated to “super_orchestrator-0.5.1/src/misc.rs”