diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2015-02-15 18:33:11 +0530 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2015-02-15 18:42:46 +0530 |
| commit | 8acaaa9e0e631944ae809d3228561f7dfc44e66b (patch) | |
| tree | ea46fea4d491453c8730ff769dcc83ef98c26212 /src/libstd | |
| parent | c59f62b75f6bbf79df2283d250a568193927a4c3 (diff) | |
| parent | 10dd8e721e0682de31006ca311400819b634771e (diff) | |
| download | rust-8acaaa9e0e631944ae809d3228561f7dfc44e66b.tar.gz rust-8acaaa9e0e631944ae809d3228561f7dfc44e66b.zip | |
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`!
Diffstat (limited to 'src/libstd')
| -rwxr-xr-x | src/libstd/path.rs | 1 |
1 files changed, 1 insertions, 0 deletions
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 } |
