Rename new method to Mnemonic::parse_in_normalized_without_checksum_check

This is according with the other methods in the API.
This commit is contained in:
Steven Roose 2023-02-26 18:36:34 +00:00
parent 6b79d78c80
commit d3c96b1448
No known key found for this signature in database
GPG Key ID: 2F2A88D7F8D68E87
1 changed files with 8 additions and 1 deletions

View File

@ -435,7 +435,14 @@ impl Mnemonic {
}
/// Parse a mnemonic in normalized UTF8 in the given language without checksum check.
pub fn parse_without_checksum_check(language: Language, s: &str) -> Result<Mnemonic, Error> {
///
/// It is advised to use this method together with the utility methods
/// - [Mnemonic::normalize_utf8_cow]
/// - [Mnemonic::language_of]
pub fn parse_in_normalized_without_checksum_check(
language: Language,
s: &str,
) -> Result<Mnemonic, Error> {
let nb_words = s.split_whitespace().count();
if is_invalid_word_count(nb_words) {
return Err(Error::BadWordCount(nb_words));