Skip to content

Commit 18d3f3f

Browse files
Rollup merge of rust-lang#55389 - meven:master, r=shepmaster
Remove unnecessary mut in iterator.find_map documentation example, R… Relates to rust-lang#49098 Removes a mut that could induce newcomers to put a mut in their code that the compiler would comply about. https://github.com/rust-lang/rust/pull/49098/files#r227422388
2 parents 2994675 + c674802 commit 18d3f3f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libcore/iter/iterator.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1857,7 +1857,7 @@ pub trait Iterator {
18571857
/// ```
18581858
/// let a = ["lol", "NaN", "2", "5"];
18591859
///
1860-
/// let mut first_number = a.iter().find_map(|s| s.parse().ok());
1860+
/// let first_number = a.iter().find_map(|s| s.parse().ok());
18611861
///
18621862
/// assert_eq!(first_number, Some(2));
18631863
/// ```

0 commit comments

Comments
 (0)