From 80ae1ec12d6aa7d5cec840387c14a196296b983c Mon Sep 17 00:00:00 2001 From: Centri3 <114838443+Centri3@users.noreply.github.com> Date: Thu, 25 May 2023 11:43:14 -0500 Subject: [PATCH] unidiomatic `if_chain!` --- clippy_lints/src/endian_bytes.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/clippy_lints/src/endian_bytes.rs b/clippy_lints/src/endian_bytes.rs index 434125932c4..05005a791c2 100644 --- a/clippy_lints/src/endian_bytes.rs +++ b/clippy_lints/src/endian_bytes.rs @@ -105,10 +105,9 @@ fn check_expr(&mut self, cx: &LateContext<'_>, expr: &Expr<'_>) { if args.is_empty(); let ty = cx.typeck_results().expr_ty(receiver); if ty.is_primitive_ty(); + if try_lint_endian_bytes(cx, expr, "to", method_name.ident.name, ty); then { - if try_lint_endian_bytes(cx, expr, "to", method_name.ident.name, ty) { - return; - } + return; } }