Skip to content

Commit 3ad1c83

Browse files
haulethsteveklabnik
authored andcommitted
Add description of fold function arguments.
1 parent 6dcc0e5 commit 3ad1c83

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libcore/iter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ pub trait IteratorExt: Iterator + Sized {
611611
///
612612
/// ```
613613
/// let a = [1, 2, 3, 4, 5];
614-
/// assert!(a.iter().fold(0, |a, &b| a + b) == 15);
614+
/// assert!(a.iter().fold(0, |acc, &item| acc + item) == 15);
615615
/// ```
616616
#[inline]
617617
#[stable(feature = "rust1", since = "1.0.0")]

0 commit comments

Comments
 (0)