From 53c20ea16872d1a7ab3e394d972f7b856d48dd0b Mon Sep 17 00:00:00 2001 From: Nicholas Rodrigues Lordello Date: Tue, 17 Aug 2021 18:33:41 +0000 Subject: Updated cargo version and dependencies --- src/mnemonic/wordlist.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/mnemonic') 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] } } -- cgit v1.2.3