Simplify [T; N]::try_map signature · model-checking/verify-rust-std@483f641 (original) (raw)

Original file line number Diff line number Diff line change
@@ -533,11 +533,9 @@ impl<T, const N: usize> [T; N] {
533 533 /// assert_eq!(c, Some(a));
534 534 /// ```
535 535 #[unstable(feature = "array_try_map", issue = "79711")]
536 -pub fn try_map<F, R>(self, f: F) -> ChangeOutputType<R, [R::Output; N]>
536 +pub fn try_map<R>(self, f: impl FnMut(T) -> R) -> ChangeOutputType<R, [R::Output; N]>
537 537 where
538 -F: FnMut(T) -> R,
539 -R: Try,
540 -R::Residual: Residual<[R::Output; N]>,
538 +R: Try<Residual: Residual<[R::Output; N]>>,
541 539 {
542 540 drain_array_with(self, |iter
543 541 }