Skip to content

Commit

Permalink
Simplified boolean expression for checking literal suffixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael A. Plikk committed Sep 6, 2018
1 parent 986c772 commit 7bf8d8b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions clippy_lints/src/literal_representation.rs
Expand Up @@ -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,
Expand Down

0 comments on commit 7bf8d8b

Please sign in to comment.