From 63cc474ba03577f6705d12ab759c2e44957abc5f Mon Sep 17 00:00:00 2001 From: Frances Wingerter <91758128+fw-immunant@users.noreply.github.com> Date: Thu, 20 Feb 2025 21:51:39 +0000 Subject: [PATCH] closures/exercise.rs: drop trait bounds from struct definition (#2649) This is more idiomatic than what we had before. We keep the trait bounds for the inherent impl, because the new method can use them to guide inference of unannotated closure arguments. --- src/closures/exercise.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/closures/exercise.rs b/src/closures/exercise.rs index e6951257..3db9b660 100644 --- a/src/closures/exercise.rs +++ b/src/closures/exercise.rs @@ -29,11 +29,7 @@ impl Logger for StderrLogger { // ANCHOR_END: setup /// Only log messages matching a filtering predicate. -struct Filter -where - L: Logger, - P: Fn(u8, &str) -> bool, -{ +struct Filter { inner: L, predicate: P, }