Skip to content

Commit 3d75598

Browse files
Simplify test_specializations
1 parent f88e3ef commit 3d75598

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/specializations.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ where
2828
}
2929
}
3030

31-
fn test_specializations<IterItem, Iter>(it: &Iter)
31+
fn test_specializations<I>(it: &I)
3232
where
33-
IterItem: Eq + Debug + Clone,
34-
Iter: Iterator<Item = IterItem> + Clone,
33+
I::Item: Eq + Debug + Clone,
34+
I: Iterator + Clone,
3535
{
3636
macro_rules! check_specialized {
3737
($src:expr, |$it:pat| $closure:expr) => {
@@ -52,7 +52,7 @@ where
5252
check_specialized!(it, |i| i.collect::<Vec<_>>());
5353
check_specialized!(it, |i| {
5454
let mut parameters_from_fold = vec![];
55-
let fold_result = i.fold(vec![], |mut acc, v: IterItem| {
55+
let fold_result = i.fold(vec![], |mut acc, v: I::Item| {
5656
parameters_from_fold.push((acc.clone(), v.clone()));
5757
acc.push(v);
5858
acc

0 commit comments

Comments
 (0)