Rollup merge of #22351 - blaenk:path-hash, r=huonw

`PathBuf` does implement `Hash`, but `Path` doesn't. This makes it
annoying if you have a `HashMap` with `PathBuf`s as keys, because
it means you have to convert a `Path` into a `PathBuf` and get a
reference to it simply to perform operations on the `HashMap`!
This commit is contained in:
Manish Goregaokar 2015-02-15 18:33:11 +05:30
commit 8acaaa9e0e

View File

@ -1033,6 +1033,7 @@ impl AsOsStr for PathBuf {
/// let parent_dir = path.parent();
/// ```
///
#[derive(Hash)]
pub struct Path {
inner: OsStr
}