Skip to content

Commit 87e641a

Browse files
committed
Fix formatting
1 parent a25032c commit 87e641a

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

Diff for: library/core/src/iter/traits/collect.rs

+19-19
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,7 @@ macro_rules! spec_tuple_impl {
629629
}
630630

631631
impl<$($ty_names,)* $($extend_ty_names,)* Iter> $trait_name<$($extend_ty_names),*> for Iter
632-
where
632+
where
633633
$($extend_ty_names: Extend<$ty_names>,)*
634634
Iter: Iterator<Item = ($($ty_names,)*)>,
635635
{
@@ -639,37 +639,37 @@ macro_rules! spec_tuple_impl {
639639
}
640640

641641
impl<$($ty_names,)* $($extend_ty_names,)* Iter> $trait_name<$($extend_ty_names),*> for Iter
642-
where
642+
where
643643
$($extend_ty_names: Extend<$ty_names>,)*
644644
Iter: TrustedLen<Item = ($($ty_names,)*)>,
645645
{
646646
fn extend(self, $($var_names: &mut $extend_ty_names,)*) {
647647
fn extend<'a, $($ty_names,)*>(
648648
$($var_names: &'a mut impl Extend<$ty_names>,)*
649649
) -> impl FnMut((), ($($ty_names,)*)) + 'a {
650-
#[allow(non_snake_case)]
651-
// SAFETY: We reserve enough space for the `size_hint`, and the iterator is `TrustedLen`
652-
// so its `size_hint` is exact.
653-
move |(), ($($extend_ty_names,)*)| unsafe {
654-
$($var_names.extend_one_unchecked($extend_ty_names);)*
650+
#[allow(non_snake_case)]
651+
// SAFETY: We reserve enough space for the `size_hint`, and the iterator is
652+
// `TrustedLen` so its `size_hint` is exact.
653+
move |(), ($($extend_ty_names,)*)| unsafe {
654+
$($var_names.extend_one_unchecked($extend_ty_names);)*
655+
}
655656
}
656-
}
657657

658-
let (lower_bound, upper_bound) = self.size_hint();
658+
let (lower_bound, upper_bound) = self.size_hint();
659659

660-
if upper_bound.is_none() {
661-
// We cannot reserve more than `usize::MAX` items, and this is likely to go out of memory anyway.
662-
$default_fn_name(self, $($var_names,)*);
663-
return;
664-
}
660+
if upper_bound.is_none() {
661+
// We cannot reserve more than `usize::MAX` items, and this is likely to go out of memory anyway.
662+
$default_fn_name(self, $($var_names,)*);
663+
return;
664+
}
665665

666-
if lower_bound > 0 {
667-
$($var_names.extend_reserve(lower_bound);)*
668-
}
666+
if lower_bound > 0 {
667+
$($var_names.extend_reserve(lower_bound);)*
668+
}
669669

670-
self.fold((), extend($($var_names,)*));
670+
self.fold((), extend($($var_names,)*));
671+
}
671672
}
672-
}
673673

674674
};
675675
}

0 commit comments

Comments
 (0)