diff --git a/src/closures/solution.md b/src/closures/solution.md index b4a4c92c..c99a554a 100644 --- a/src/closures/solution.md +++ b/src/closures/solution.md @@ -3,3 +3,12 @@ ```rust,editable {{#include exercise.rs:solution}} ``` + +
+ +- Note that the `P: Fn(u8, &str) -> bool` bound on the first `Filter` impl block + isn't strictly necessary, but it helps with type inference when calling `new`. + Demonstrate removing it and showing how the compiler now needs type + annotations for the closure passed to `new`. + +