Skip to content

Commit 6fb3f3d

Browse files
committed
apply case_lossless to Clippy source
1 parent 48f7b5e commit 6fb3f3d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: clippy_lints/src/unicode.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ impl LateLintPass<'_> for Unicode {
8787
fn escape<T: Iterator<Item = char>>(s: T) -> String {
8888
let mut result = String::new();
8989
for c in s {
90-
if c as u32 > 0x7F {
90+
if u32::from(c) > 0x7F {
9191
for d in c.escape_unicode() {
9292
result.push(d);
9393
}
@@ -119,7 +119,7 @@ fn check_str(cx: &LateContext<'_>, span: Span, id: HirId) {
119119
});
120120
}
121121

122-
if string.chars().any(|c| c as u32 > 0x7F) {
122+
if string.chars().any(|c| u32::from(c) > 0x7F) {
123123
#[expect(clippy::collapsible_span_lint_calls, reason = "rust-clippy#7797")]
124124
span_lint_and_then(
125125
cx,

0 commit comments

Comments
 (0)