Skip to content

Commit d377f59

Browse files
committed
feat: Implement PredicateBoxExt for ?Sized
In particular, this makes `predicate::str::contains(...).boxed()` work.
1 parent db0a4cf commit d377f59

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77
<!-- next-header -->
88
## [Unreleased] - ReleaseDate
99

10+
### Added
11+
12+
- The `boxed` function is now available for predicates with an `Item` type that
13+
is not `Sized`.
14+
1015
## [3.1.2] - 2024-07-25
1116

1217
## [3.1.1] - 2024-07-25

src/boxed.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ where
114114
}
115115
}
116116

117-
impl<P, Item> PredicateBoxExt<Item> for P where P: Predicate<Item> {}
117+
impl<P, Item: ?Sized> PredicateBoxExt<Item> for P where P: Predicate<Item> {}
118118

119119
#[cfg(test)]
120120
mod test {

0 commit comments

Comments
 (0)