diff --git a/util/keccak-hasher/Cargo.toml b/util/keccak-hasher/Cargo.toml index 09b0de352..b10267f3a 100644 --- a/util/keccak-hasher/Cargo.toml +++ b/util/keccak-hasher/Cargo.toml @@ -1,6 +1,7 @@ [package] name = "keccak-hasher" version = "0.1.1" +edition = "2018" authors = ["Parity Technologies "] description = "Keccak-256 implementation of the Hasher trait" license = "GPL-3.0" diff --git a/util/keccak-hasher/src/lib.rs b/util/keccak-hasher/src/lib.rs index d9c9be545..b40d274d3 100644 --- a/util/keccak-hasher/src/lib.rs +++ b/util/keccak-hasher/src/lib.rs @@ -15,15 +15,14 @@ // along with Parity Ethereum. If not, see . //! Hasher implementation for the Keccak-256 hash -extern crate hash_db; -extern crate ethereum_types; -extern crate tiny_keccak; -extern crate plain_hasher; + +#![warn(missing_docs)] use hash_db::Hasher; use ethereum_types::H256; use tiny_keccak::Keccak; use plain_hasher::PlainHasher; + /// Concrete `Hasher` impl for the Keccak-256 hash #[derive(Default, Debug, Clone, PartialEq)] pub struct KeccakHasher; @@ -32,7 +31,7 @@ impl Hasher for KeccakHasher { type StdHasher = PlainHasher; const LENGTH: usize = 32; fn hash(x: &[u8]) -> Self::Out { - let mut out = [0;32]; + let mut out = [0; 32]; Keccak::keccak256(x, &mut out); out.into() }