diff options
| author | Mark Simulacrum <mark.simulacrum@gmail.com> | 2017-06-22 06:30:09 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-06-22 06:30:09 -0600 |
| commit | a56fef8d2c3cebee2aa487aab32fe29105775c36 (patch) | |
| tree | 2f02e37c3d5b128c37eb49e71d7316fd19f77b59 /src | |
| parent | 03c8b92dc1c160c86d7ba6f08ee718a5324de136 (diff) | |
| parent | 6e628bee95ab97f1dd9ab3cfb1e7b8a782564d8d (diff) | |
| download | rust-a56fef8d2c3cebee2aa487aab32fe29105775c36.tar.gz rust-a56fef8d2c3cebee2aa487aab32fe29105775c36.zip | |
Rollup merge of #42799 - leodasvacas:impl-clone-for-default-hasher, r=sfackler
Impl Clone for DefaultHasher It's useful for a hasher to be `Clone`. It's also strange for any type to not be `Clone`. `DefaultHasher` is not meant to be used directly, but being in std it can be useful as a placeholder. I don't see any forward compatibility hazard if the hasher is changed since it's very rare for something to not be `Clone`.
Diffstat (limited to 'src')
| -rw-r--r-- | src/libstd/collections/hash/map.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs index 8c4cbb66b45..aef88e3d563 100644 --- a/src/libstd/collections/hash/map.rs +++ b/src/libstd/collections/hash/map.rs @@ -2384,7 +2384,7 @@ impl BuildHasher for RandomState { /// [`Hasher`]: ../../hash/trait.Hasher.html #[stable(feature = "hashmap_default_hasher", since = "1.13.0")] #[allow(deprecated)] -#[derive(Debug)] +#[derive(Clone, Debug)] pub struct DefaultHasher(SipHasher13); impl DefaultHasher { |
