diff --git a/src/tools/unicode-table-generator/src/raw_emitter.rs b/src/tools/unicode-table-generator/src/raw_emitter.rs index e9e0efc459442..03ed9499e26c5 100644 --- a/src/tools/unicode-table-generator/src/raw_emitter.rs +++ b/src/tools/unicode-table-generator/src/raw_emitter.rs @@ -341,7 +341,7 @@ impl Canonicalized { for &w in unique_words { unique_mapping.entry(w).or_insert_with(|| { canonical_words.push(w); - UniqueMapping::Canonical(canonical_words.len()) + UniqueMapping::Canonical(canonical_words.len() - 1) }); } assert_eq!(canonicalized_words.len() + canonical_words.len(), unique_words.len());