Skip to content

Commit a03ae99

Browse files
committed
feat: Make BoxPredicate::find_case use the inner find_case
1 parent 9b59897 commit a03ae99

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/boxed.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
use std::fmt;
1313

1414
use crate::reflection;
15-
use crate::utils;
1615
use crate::Predicate;
1716

1817
/// `Predicate` that wraps another `Predicate` as a trait object, allowing
@@ -73,7 +72,7 @@ where
7372
}
7473

7574
fn find_case<'a>(&'a self, expected: bool, variable: &Item) -> Option<reflection::Case<'a>> {
76-
utils::default_find_case(self, expected, variable)
75+
self.0.find_case(expected, variable)
7776
}
7877
}
7978

@@ -132,7 +131,7 @@ mod test {
132131
let p2 = p1.boxed();
133132
match (p1.find_case(false, &4), p2.find_case(false, &4)) {
134133
(Some(c1), Some(c2)) => {
135-
assert_ne!(format!("{c1:?}"), format!("{c2:?}"));
134+
assert_eq!(format!("{c1:?}"), format!("{c2:?}"));
136135
}
137136
_ => {
138137
panic!();

0 commit comments

Comments
 (0)