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`.
This commit is contained in:
Mark Simulacrum 2017-06-22 06:30:09 -06:00 committed by GitHub
commit a56fef8d2c

View file

@ -2384,7 +2384,7 @@ fn build_hasher(&self) -> DefaultHasher {
/// [`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 {