Skip to content

Commit 80ae1ec

Browse files
committed
unidiomatic if_chain!
1 parent 04b7cae commit 80ae1ec

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

clippy_lints/src/endian_bytes.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,9 @@ impl LateLintPass<'_> for EndianBytes {
105105
if args.is_empty();
106106
let ty = cx.typeck_results().expr_ty(receiver);
107107
if ty.is_primitive_ty();
108+
if try_lint_endian_bytes(cx, expr, "to", method_name.ident.name, ty);
108109
then {
109-
if try_lint_endian_bytes(cx, expr, "to", method_name.ident.name, ty) {
110-
return;
111-
}
110+
return;
112111
}
113112
}
114113

0 commit comments

Comments
 (0)