Link to Option/Result for Iterator::sum/product

This commit is contained in:
clubby789 2023-01-04 02:04:31 +00:00
parent c7572670a1
commit 01d6c04875

View File

@ -3366,6 +3366,9 @@ fn array_chunks<const N: usize>(self) -> ArrayChunks<Self, N>
///
/// An empty iterator returns the zero value of the type.
///
/// `sum()` can be used to sum any type implementing [`Sum`][`core::iter::Sum`],
/// including [`Option`][`Option::sum`] and [`Result`][`Result::sum`].
///
/// # Panics
///
/// When calling `sum()` and a primitive integer type is being returned, this
@ -3395,6 +3398,9 @@ fn sum<S>(self) -> S
///
/// An empty iterator returns the one value of the type.
///
/// `product()` can be used to multiply any type implementing [`Product`][`core::iter::Product`],
/// including [`Option`][`Option::product`] and [`Result`][`Result::product`].
///
/// # Panics
///
/// When calling `product()` and a primitive integer type is being returned,