diff --git a/CHANGELOG.md b/CHANGELOG.md index ec90235..c27e58f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] - ReleaseDate +### Added + +- The `boxed` function is now available for predicates with an `Item` type that + is not `Sized`. + ## [3.1.2] - 2024-07-25 ## [3.1.1] - 2024-07-25 diff --git a/src/boxed.rs b/src/boxed.rs index 55caac3..2b96e0c 100644 --- a/src/boxed.rs +++ b/src/boxed.rs @@ -114,4 +114,15 @@ where } } -impl PredicateBoxExt for P where P: Predicate {} +impl PredicateBoxExt for P where P: Predicate {} + +#[cfg(test)] +mod test { + use crate::prelude::*; + + #[test] + fn unsized_boxed() { + let p = predicate::always().boxed(); + p.eval("4"); + } +}