aboutsummaryrefslogtreecommitdiff
path: root/src/mnemonic/wordlist.rs
diff options
context:
space:
mode:
authorNicholas Rodrigues Lordello <[email protected]>2021-08-17 18:33:41 +0000
committerNicholas Rodrigues Lordello <[email protected]>2021-08-17 18:33:41 +0000
commit53c20ea16872d1a7ab3e394d972f7b856d48dd0b (patch)
treebd473f5ed5f068c6cfe0c81d3c6fb1fe8418a551 /src/mnemonic/wordlist.rs
parent177d24325a098e6e62ee9445a0a3cf59a119628c (diff)
Updated cargo version and dependencies
Diffstat (limited to 'src/mnemonic/wordlist.rs')
-rw-r--r--src/mnemonic/wordlist.rs6
1 files changed, 2 insertions, 4 deletions
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]
}
}