keyfork-mnemonic-generate: so, dedup only removes sequential duplicates

This commit is contained in:
Ryan Heywood 2023-08-18 00:28:31 -05:00
parent 3032e11b78
commit ac40930b2f
Signed by: ryan
GPG Key ID: 8E401478A3FBEF72
1 changed files with 2 additions and 0 deletions

View File

@ -270,6 +270,8 @@ mod tests {
*set.entry(word).or_insert(0) += 1; *set.entry(word).or_insert(0) += 1;
} }
let mut words = mnemonic.word_iter().collect::<Vec<_>>(); let mut words = mnemonic.word_iter().collect::<Vec<_>>();
words.sort();
assert_eq!(words.len(), 24);
words.dedup(); words.dedup();
if words.len() != 24 { if words.len() != 24 {
count += 1.; count += 1.;