diff options
| author | est31 <MTest31@outlook.com> | 2023-06-11 07:11:47 +0200 |
|---|---|---|
| committer | est31 <MTest31@outlook.com> | 2023-06-30 18:01:28 +0200 |
| commit | c6be62159ff6c100786a86b6a5687ded883ace5f (patch) | |
| tree | 97225b2ce334b5d2dfcc3c0dc1a9014d89529214 | |
| parent | 86391abc704555610af8ba33d910bdd16a877ddb (diff) | |
| download | rust-c6be62159ff6c100786a86b6a5687ded883ace5f.tar.gz rust-c6be62159ff6c100786a86b6a5687ded883ace5f.zip | |
Fix the now stricter lint in manual_rem_euclid.rs
| -rw-r--r-- | clippy_lints/src/manual_rem_euclid.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clippy_lints/src/manual_rem_euclid.rs b/clippy_lints/src/manual_rem_euclid.rs index aafee92713f..0e89ca132ef 100644 --- a/clippy_lints/src/manual_rem_euclid.rs +++ b/clippy_lints/src/manual_rem_euclid.rs @@ -119,7 +119,7 @@ fn check_for_either_unsigned_int_constant<'a>( } fn check_for_unsigned_int_constant<'a>(cx: &'a LateContext<'_>, expr: &'a Expr<'_>) -> Option<u128> { - let Some(int_const) = constant_full_int(cx, cx.typeck_results(), expr) else { return None }; + let int_const = constant_full_int(cx, cx.typeck_results(), expr)?; match int_const { FullInt::S(s) => s.try_into().ok(), FullInt::U(u) => Some(u), |
