keyfork-mnemonic-util: expose additional functions from wordlist
This commit is contained in:
parent
920e04ba23
commit
d452eba133
|
@ -64,8 +64,13 @@ impl Wordlist {
|
|||
Arc::new(self)
|
||||
}
|
||||
|
||||
/// Determine whether the Wordlist contains a given word.
|
||||
pub fn contains(&self, word: &str) -> bool {
|
||||
self.0.iter().any(|w| w.as_str() == word)
|
||||
}
|
||||
|
||||
/// Given an index, get a word from the wordlist.
|
||||
fn get_word(&self, word: usize) -> Option<&String> {
|
||||
pub fn get_word(&self, word: usize) -> Option<&String> {
|
||||
self.0.get(word)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue