Skip to content

Conversation

@stevenroose
Copy link
Collaborator

@stevenroose stevenroose commented Apr 1, 2021

This change should not break any API, it only adds an extra Clone on the word_iter method.

Copy link

@sgeisler sgeisler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! I guess this supersedes #10?

/// interpreted in multiple languages, an [Error::AmbiguousLanguages] is
/// returned, containing the possible languages.
fn language_of<S: AsRef<str>>(mnemonic: S) -> Result<Language, Error> {
pub fn language_of<S: AsRef<str>>(mnemonic: S) -> Result<Language, Error> {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think your observation from #10 is still true that you can use the narrower error type here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No because here S is a string so it can be an invalid mnemonic. This is the static method used for parsing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants