mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-23 13:13:34 +00:00
Simplified boolean expression for checking literal suffixes
This commit is contained in:
parent
986c772c24
commit
7bf8d8ba09
1 changed files with 2 additions and 3 deletions
|
@ -163,9 +163,8 @@ impl<'a> DigitInfo<'a> {
|
|||
} else {
|
||||
d_idx
|
||||
};
|
||||
if !float && (d == 'i' || d == 'u') ||
|
||||
float && (d == 'f' || d == 'e' || d == 'E') ||
|
||||
!float && is_possible_suffix_index(&sans_prefix, suffix_start, len) {
|
||||
if float && (d == 'f' || d == 'e' || d == 'E') ||
|
||||
!float && (d == 'i' || d == 'u' || is_possible_suffix_index(&sans_prefix, suffix_start, len)) {
|
||||
let (digits, suffix) = sans_prefix.split_at(suffix_start);
|
||||
return Self {
|
||||
digits,
|
||||
|
|
Loading…
Reference in a new issue