diff --git a/crates/ethers-types/src/keys.rs b/crates/ethers-types/src/keys.rs index 053d0fd0..c17f9ce4 100644 --- a/crates/ethers-types/src/keys.rs +++ b/crates/ethers-types/src/keys.rs @@ -3,8 +3,8 @@ use ethers_utils::{hash_message, keccak256}; use rand::Rng; use secp256k1::{ - key::ONE_KEY, Error as SecpError, Message, PublicKey as PubKey, recovery::RecoveryId, Secp256k1, - SecretKey, + key::ONE_KEY, recovery::RecoveryId, Error as SecpError, Message, PublicKey as PubKey, + Secp256k1, SecretKey, }; use std::ops::Deref; use std::str::FromStr; diff --git a/crates/ethers-utils/src/lib.rs b/crates/ethers-utils/src/lib.rs index 479c85d7..6c804eb7 100644 --- a/crates/ethers-utils/src/lib.rs +++ b/crates/ethers-utils/src/lib.rs @@ -58,7 +58,7 @@ mod tests { // from https://emn178.github.io/online-tools/keccak_256.html fn test_keccak256() { assert_eq!( - keccak256("hello".as_bytes()).to_hex::(), + keccak256(b"hello").to_hex::(), "1c8aff950685c2ed4bc3174f3472287b56d9517b9c948127319a09a7a36deac8" ); }