Skip to content

Commit

Permalink
closures/exercise.rs: drop trait bounds from struct definition
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
fw-immunant committed Feb 19, 2025
1 parent 44a7974 commit 3f3ab42
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/closures/exercise.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ impl Logger for StderrLogger {

/// Only log messages matching a filtering predicate.
struct Filter<L, P>
where
L: Logger,
P: Fn(u8, &str) -> bool,
{
inner: L,
predicate: P,
Expand Down

0 comments on commit 3f3ab42

Please sign in to comment.