11use std:: collections:: { HashMap , HashSet , VecDeque } ;
22
3- use crate :: rule:: { NoSkip , Rule , SkipRule } ;
3+ use crate :: rule:: { Iterable , NoSkip , Rule , SkipRule } ;
44use crate :: Refined ;
55
66/// A type that holds a value satisfying the `ForAllRule`
7- pub type ForAll < RULE , ITERABLE , ITEM > = Refined < ForAllRule < RULE , ITERABLE , ITEM > > ;
7+ pub type ForAll < RULE , ITERABLE > = Refined < ForAllRule < RULE , ITERABLE > > ;
88
99/// A type that holds a Vec value satisfying the `ForAllRule`
1010pub type ForAllVec < RULE > = Refined < ForAllVecRule < RULE > > ;
@@ -22,25 +22,23 @@ pub type ForAllHashMap<K, RULE> = Refined<ForAllHashMapRule<K, RULE>>;
2222pub type ForAllString < RULE > = Refined < ForAllStringRule < RULE > > ;
2323
2424/// Rule where all the data in the collection satisfies the condition
25- pub type ForAllRule < RULE , ITERABLE , ITEM > = SkipRule < RULE , ITERABLE , NoSkip < ITEM > > ;
25+ pub type ForAllRule < RULE , ITERABLE > =
26+ SkipRule < RULE , ITERABLE , NoSkip < <ITERABLE as Iterable >:: Item > > ;
2627
2728/// Rule where all the data in the `Vec` satisfies the condition
28- pub type ForAllVecRule < RULE > = ForAllRule < RULE , Vec < <RULE as Rule >:: Item > , < RULE as Rule > :: Item > ;
29+ pub type ForAllVecRule < RULE > = ForAllRule < RULE , Vec < <RULE as Rule >:: Item > > ;
2930
3031/// Rule where all the data in the `VecDeque` satisfies the condition
31- pub type ForAllVecDequeRule < RULE > =
32- ForAllRule < RULE , VecDeque < <RULE as Rule >:: Item > , <RULE as Rule >:: Item > ;
32+ pub type ForAllVecDequeRule < RULE > = ForAllRule < RULE , VecDeque < <RULE as Rule >:: Item > > ;
3333
3434/// Rule where all the data in the `HashSet` satisfies the condition
35- pub type ForAllHashSetRule < RULE > =
36- ForAllRule < RULE , HashSet < <RULE as Rule >:: Item > , <RULE as Rule >:: Item > ;
35+ pub type ForAllHashSetRule < RULE > = ForAllRule < RULE , HashSet < <RULE as Rule >:: Item > > ;
3736
3837/// Rule where all the data in the `HashMap` satisfies the condition
39- pub type ForAllHashMapRule < K , RULE > =
40- ForAllRule < RULE , HashMap < K , <RULE as Rule >:: Item > , <RULE as Rule >:: Item > ;
38+ pub type ForAllHashMapRule < K , RULE > = ForAllRule < RULE , HashMap < K , <RULE as Rule >:: Item > > ;
4139
4240/// Rule where all the data in the `String` satisfies the condition
43- pub type ForAllStringRule < RULE > = ForAllRule < RULE , String , char > ;
41+ pub type ForAllStringRule < RULE > = ForAllRule < RULE , String > ;
4442
4543#[ cfg( test) ]
4644mod tests {
0 commit comments