From 10dd8e721e0682de31006ca311400819b634771e Mon Sep 17 00:00:00 2001 From: Jorge Israel Peña Date: Sat, 14 Feb 2015 02:43:36 -0800 Subject: 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`! --- src/libstd/path.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'src/libstd') diff --git a/src/libstd/path.rs b/src/libstd/path.rs index 271a4cdb629..1f6d39fb1b3 100755 --- a/src/libstd/path.rs +++ b/src/libstd/path.rs @@ -1033,6 +1033,7 @@ impl AsOsStr for PathBuf { /// let parent_dir = path.parent(); /// ``` /// +#[derive(Hash)] pub struct Path { inner: OsStr } -- cgit 1.4.1-3-g733a5