mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-16 04:55:22 +03:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user