Auto merge of #7835 - mikerite:unneeded-allow-20211018, r=xFrednet

Remove unneeded allow

Remove unneeded allow

changelog: none
This commit is contained in:
bors 2021-10-18 07:25:12 +00:00
commit 389a74b31a

View File

@ -66,7 +66,6 @@ fn is_allowed(cx: &LateContext<'_>, cmp: BinOp, left: &Expr<'_>, right: &Expr<'_
&& constant_simple(cx, cx.typeck_results(), left) == Some(Constant::Int(1)) && constant_simple(cx, cx.typeck_results(), left) == Some(Constant::Int(1))
} }
#[allow(clippy::cast_possible_wrap)]
fn check(cx: &LateContext<'_>, e: &Expr<'_>, m: i8, span: Span, arg: Span) { fn check(cx: &LateContext<'_>, e: &Expr<'_>, m: i8, span: Span, arg: Span) {
if let Some(Constant::Int(v)) = constant_simple(cx, cx.typeck_results(), e) { if let Some(Constant::Int(v)) = constant_simple(cx, cx.typeck_results(), e) {
let check = match *cx.typeck_results().expr_ty(e).kind() { let check = match *cx.typeck_results().expr_ty(e).kind() {