diff --git a/clippy_lints/src/literal_representation.rs b/clippy_lints/src/literal_representation.rs index 3ea818d3db6..6991be7d790 100644 --- a/clippy_lints/src/literal_representation.rs +++ b/clippy_lints/src/literal_representation.rs @@ -538,13 +538,10 @@ impl LiteralRepresentation { return } let hex = format!("{:#X}", val); - let digit_info = DigitInfo::new(&hex[..], false); + let digit_info = DigitInfo::new(&hex, false); let _ = Self::do_lint(digit_info.digits).map_err(|warning_type| { warning_type.display(&digit_info.grouping_hint(), cx, lit.span) }); - } - else { - return }; } }