fix: Disply for Error::BadWordCount
This Display description of the BadWordCount variant incorrectly complained stated that the word count is not a multiple of 6. The correct criteria for valid word counts is now that it must be a multiple of 3 between 12 and 24 inclusive, so the Display impl is fixed to be more precise.
This commit is contained in:
parent
03dbb973cb
commit
593f4767f4
|
@ -120,7 +120,12 @@ impl fmt::Display for Error {
|
|||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
match *self {
|
||||
Error::BadWordCount(c) => {
|
||||
write!(f, "mnemonic has a word count that is not a multiple of 6: {}", c,)
|
||||
write!(
|
||||
f,
|
||||
"mnemonic has an invalid word count: {}. Word count must be 12, 15, 18, 21, \
|
||||
or 24",
|
||||
c
|
||||
)
|
||||
}
|
||||
Error::UnknownWord(i) => write!(f, "mnemonic contains an unknown word (word {})", i,),
|
||||
Error::BadEntropyBitCount(c) => write!(
|
||||
|
|
Loading…
Reference in New Issue