I’d like to propose a naming change to the Rust standard library: rename
PathString. To explain, let’s look at this table:
|Guarantees||“Slice” Variety||“Owned” Variety|
As you can see, the
String split is consistent, except for the two path types:
PathBuf. Obviously, backwards compatibility concerns mean that the current names can’t be eliminated. But they can be deprecated, in favor of
PathString. The way of doing it would likely be to rename the types, and then provide the old names as aliases.
This is a nit, but fixing it seems like something that would make Rust’s string types more consistent, and approachable for newer Rust programmers.