Skip to content

Commit 7c12eaf

Browse files
Use characters instead of u32 in confusable map (#8463)
1 parent 41e538a commit 7c12eaf

File tree

3 files changed

+1602
-1594
lines changed

3 files changed

+1602
-1594
lines changed

crates/ruff_linter/src/rules/ruff/rules/ambiguous_unicode_character.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ pub(crate) fn ambiguous_unicode_character(
163163
let candidate = Candidate::new(
164164
TextSize::try_from(relative_offset).unwrap() + range.start(),
165165
current_char,
166-
char::from_u32(representant).unwrap(),
166+
representant,
167167
);
168168
if let Some(diagnostic) = candidate.into_diagnostic(context, settings) {
169169
diagnostics.push(diagnostic);
@@ -178,7 +178,7 @@ pub(crate) fn ambiguous_unicode_character(
178178
word_candidates.push(Candidate::new(
179179
TextSize::try_from(relative_offset).unwrap() + range.start(),
180180
current_char,
181-
char::from_u32(representant).unwrap(),
181+
representant,
182182
));
183183
} else {
184184
// The current word contains at least one unambiguous unicode character.

0 commit comments

Comments
 (0)