Skip to content

Commit

Permalink
test: demonstrate PredicateBoxExt requires Sized
Browse files Browse the repository at this point in the history
This test should fail, and the next commit should make it pass.
  • Loading branch information
marienz committed Dec 17, 2024
1 parent 5bd6da7 commit ed67768
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/boxed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,14 @@ where
}

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

#[cfg(test)]
mod test {
use crate::prelude::*;

#[test]
fn unsized_boxed() {
let p = predicate::always().boxed();
p.eval("4");
}
}

0 comments on commit ed67768

Please sign in to comment.