From e3afc72caad1132ecad4ba75fc810a3ad309b49e Mon Sep 17 00:00:00 2001 From: kyoto7250 <50972773+kyoto7250@users.noreply.github.com> Date: Thu, 9 Jun 2022 22:20:59 +0900 Subject: [PATCH] remove needless return --- clippy_lints/src/use_retain.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/clippy_lints/src/use_retain.rs b/clippy_lints/src/use_retain.rs index 324ae06106c2..d2479168ada5 100644 --- a/clippy_lints/src/use_retain.rs +++ b/clippy_lints/src/use_retain.rs @@ -220,14 +220,14 @@ fn make_sugg( } fn match_acceptable_def_path(cx: &LateContext<'_>, collect_def_id: DefId) -> bool { - return ACCEPTABLE_METHODS + ACCEPTABLE_METHODS .iter() - .any(|&method| match_def_path(cx, collect_def_id, method)); + .any(|&method| match_def_path(cx, collect_def_id, method)) } fn match_acceptable_type(cx: &LateContext<'_>, expr: &hir::Expr<'_>) -> bool { let expr_ty = cx.typeck_results().expr_ty(expr).peel_refs(); - return ACCEPTABLE_TYPES + ACCEPTABLE_TYPES .iter() - .any(|&ty| is_type_diagnostic_item(cx, expr_ty, ty)); + .any(|&ty| is_type_diagnostic_item(cx, expr_ty, ty)) }