Skip to content

Commit 4a85755

Browse files
committed
Minor simplification
Apply eta-reduction on map to simplify code and make the style more consistent
1 parent c04e65d commit 4a85755

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_lint/src/types/literal.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ fn get_type_suggestion(t: Ty<'_>, val: u128, negative: bool) -> Option<&'static
205205
ty::Uint(ty::UintTy::Usize) | ty::Int(ty::IntTy::Isize) => None,
206206
ty::Uint(_) => Some(Integer::fit_unsigned(val).uint_ty_str()),
207207
ty::Int(int) => {
208-
let signed = literal_to_i128(val, negative).map(|v| Integer::fit_signed(v));
208+
let signed = literal_to_i128(val, negative).map(Integer::fit_signed);
209209
if negative {
210210
signed.map(Integer::int_ty_str)
211211
} else {

0 commit comments

Comments
 (0)