Skip to content

Commit 7bf8d8b

Browse files
author
Michael A. Plikk
committed
Simplified boolean expression for checking literal suffixes
1 parent 986c772 commit 7bf8d8b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

clippy_lints/src/literal_representation.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,8 @@ impl<'a> DigitInfo<'a> {
163163
} else {
164164
d_idx
165165
};
166-
if !float && (d == 'i' || d == 'u') ||
167-
float && (d == 'f' || d == 'e' || d == 'E') ||
168-
!float && is_possible_suffix_index(&sans_prefix, suffix_start, len) {
166+
if float && (d == 'f' || d == 'e' || d == 'E') ||
167+
!float && (d == 'i' || d == 'u' || is_possible_suffix_index(&sans_prefix, suffix_start, len)) {
169168
let (digits, suffix) = sans_prefix.split_at(suffix_start);
170169
return Self {
171170
digits,

0 commit comments

Comments
 (0)