we forgot to make Path implement Hash

`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:
Jorge Israel Peña 2015-02-14 02:43:36 -08:00
parent b63cee4a11
commit 10dd8e721e

View File

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