Skip to content

Commit

Permalink
feat: implement PredicateBoxExt for ?Sized
Browse files Browse the repository at this point in the history
In particular, this makes `predicate::str::contains(...).boxed()` work.
  • Loading branch information
marienz committed Dec 17, 2024
1 parent ed67768 commit 29c223f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
<!-- next-header -->
## [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
Expand Down
2 changes: 1 addition & 1 deletion src/boxed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ where
}
}

impl<P, Item> PredicateBoxExt<Item> for P where P: Predicate<Item> {}
impl<P, Item: ?Sized> PredicateBoxExt<Item> for P where P: Predicate<Item> {}

#[cfg(test)]
mod test {
Expand Down

0 comments on commit 29c223f

Please sign in to comment.