Skip to content

Commit 4908ed5

Browse files
committed
unicode-table-gen: more clippy fixes
1 parent 0959305 commit 4908ed5

File tree

1 file changed

+4
-6
lines changed
  • src/tools/unicode-table-generator/src

1 file changed

+4
-6
lines changed

src/tools/unicode-table-generator/src/main.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -160,16 +160,14 @@ fn load_data() -> UnicodeData {
160160
.push(Codepoints::Single(row.codepoint));
161161
}
162162

163-
if let Some(mapped) = row.simple_lowercase_mapping {
164-
if mapped != row.codepoint {
163+
if let Some(mapped) = row.simple_lowercase_mapping
164+
&& mapped != row.codepoint {
165165
to_lower.insert(row.codepoint.value(), (mapped.value(), 0, 0));
166166
}
167-
}
168-
if let Some(mapped) = row.simple_uppercase_mapping {
169-
if mapped != row.codepoint {
167+
if let Some(mapped) = row.simple_uppercase_mapping
168+
&& mapped != row.codepoint {
170169
to_upper.insert(row.codepoint.value(), (mapped.value(), 0, 0));
171170
}
172-
}
173171
}
174172

175173
for row in ucd_parse::parse::<_, ucd_parse::SpecialCaseMapping>(&UNICODE_DIRECTORY).unwrap() {

0 commit comments

Comments
 (0)