Skip to content

Commit a27547a

Browse files
committed
Fix assert_eq in doctest
1 parent aa70788 commit a27547a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/core/src/iter/traits/iterator.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -3514,9 +3514,9 @@ pub trait Iterator {
35143514
///
35153515
/// assert_eq!(sum, 6);
35163516
///
3517-
/// let b = [];
3517+
/// let b: Vec<f32> = vec![];
35183518
/// let sum: f32 = b.iter().sum();
3519-
/// assert_eq!(sum_b, -0.0_f32);
3519+
/// assert_eq!(sum, -0.0_f32);
35203520
/// ```
35213521
#[stable(feature = "iter_arith", since = "1.11.0")]
35223522
fn sum<S>(self) -> S

0 commit comments

Comments
 (0)