Skip to content

Commit 3994ee9

Browse files
committed
Add Mnemonic::language getter
1 parent 63d3eab commit 3994ee9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,11 @@ impl Mnemonic {
294294
Mnemonic::generate_in(Language::English, word_count)
295295
}
296296

297+
/// Get the language of the [Mnemonic].
298+
pub fn language(&self) -> Language {
299+
self.lang
300+
}
301+
297302
/// Get an iterator over the words.
298303
pub fn word_iter(&self) -> impl Iterator<Item = &'static str> + Clone + '_ {
299304
let list = self.lang.word_list();

0 commit comments

Comments
 (0)