aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cmd/sign.rs2
-rw-r--r--src/hdk.rs2
-rw-r--r--src/mnemonic/wordlist.rs6
3 files changed, 4 insertions, 6 deletions
diff --git a/src/cmd/sign.rs b/src/cmd/sign.rs
index 0fa002c..2dc8881 100644
--- a/src/cmd/sign.rs
+++ b/src/cmd/sign.rs
@@ -96,7 +96,7 @@ impl Data {
&transaction.as_parameters().signing_message(*chain_id),
)),
Data::Message { message } => {
- let bytes = cmd::read_input(&message)?;
+ let bytes = cmd::read_input(message)?;
let mut buffer = Vec::with_capacity(46 + bytes.len());
buffer.extend_from_slice(b"\x19Ethereum Signed Message:\n");
diff --git a/src/hdk.rs b/src/hdk.rs
index ee01360..25b3847 100644
--- a/src/hdk.rs
+++ b/src/hdk.rs
@@ -63,7 +63,7 @@ where
C: Signing,
{
let secret_key = SecretKey::from_slice(secret)?;
- let public_key = PublicKey::from_secret_key(&secp, &secret_key);
+ let public_key = PublicKey::from_secret_key(secp, &secret_key);
Ok(public_key.serialize())
}
diff --git a/src/mnemonic/wordlist.rs b/src/mnemonic/wordlist.rs
index fe8b90d..5feffa8 100644
--- a/src/mnemonic/wordlist.rs
+++ b/src/mnemonic/wordlist.rs
@@ -35,9 +35,7 @@ impl<'a> Wordlist<'a> {
// spelling mistakes as well as only consider the first letters of the
// word as long as it is unique. Additionally, certain languages have
// equivalent characters like Spanish with 'ñ' and 'n'.
- self.0
- .binary_search_by_key(&word.as_ref(), |word| &word)
- .ok()
+ self.0.binary_search(&word.as_ref()).ok()
}
/// Returns the word for the specified index.
@@ -48,7 +46,7 @@ impl<'a> Wordlist<'a> {
/// list: it must be less than `WORD_COUNT` or `1024`.
pub fn word(&'a self, index: usize) -> &'a str {
assert!(index < WORD_COUNT, "invalid word index");
- &self.0[index]
+ self.0[index]
}
}