From 60a8ec89e3f97baad0dbe097e03dc0cd30899e02 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 17 Apr 2023 20:03:56 -0500 Subject: [PATCH] chore(ci): Ban for_each --- .clippy.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.clippy.toml b/.clippy.toml index 5c6f984..56d269a 100644 --- a/.clippy.toml +++ b/.clippy.toml @@ -9,4 +9,6 @@ disallowed-methods = [ { path = "std::option::Option::map_or_else", reason = "use `map(..).unwrap_or_else(..)`" }, { path = "std::result::Result::map_or", reason = "use `map(..).unwrap_or(..)`" }, { path = "std::result::Result::map_or_else", reason = "use `map(..).unwrap_or_else(..)`" }, + { path = "std::iter::Iterator::for_each", reason = "prefer `for` for side-effects" }, + { path = "std::iter::Iterator::try_for_each", reason = "prefer `for` for side-effects" }, ]