diff --git a/fixed-hash/src/hash.rs b/fixed-hash/src/hash.rs index 94ea6655..20f3864e 100644 --- a/fixed-hash/src/hash.rs +++ b/fixed-hash/src/hash.rs @@ -258,9 +258,7 @@ macro_rules! construct_fixed_hash { #[cfg_attr(feature = "dev", allow(expl_impl_clone_on_copy))] impl $crate::core_::clone::Clone for $name { fn clone(&self) -> $name { - let mut ret = $name::zero(); - ret.0.copy_from_slice(&self.0); - ret + *self } }