diff options
| author | Nicholas Rodrigues Lordello <[email protected]> | 2021-08-17 18:33:41 +0000 |
|---|---|---|
| committer | Nicholas Rodrigues Lordello <[email protected]> | 2021-08-17 18:33:41 +0000 |
| commit | 53c20ea16872d1a7ab3e394d972f7b856d48dd0b (patch) | |
| tree | bd473f5ed5f068c6cfe0c81d3c6fb1fe8418a551 /src | |
| parent | 177d24325a098e6e62ee9445a0a3cf59a119628c (diff) | |
Updated cargo version and dependencies
Diffstat (limited to 'src')
| -rw-r--r-- | src/cmd/sign.rs | 2 | ||||
| -rw-r--r-- | src/hdk.rs | 2 | ||||
| -rw-r--r-- | src/mnemonic/wordlist.rs | 6 |
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"); @@ -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] } } |
