Skip to content

Commit

Permalink
Rollup merge of rust-lang#55389 - meven:master, r=shepmaster
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Mark-Simulacrum authored Oct 27, 2018
2 parents 2994675 + c674802 commit 18d3f3f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libcore/iter/iterator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1857,7 +1857,7 @@ pub trait Iterator {
/// ```
/// let a = ["lol", "NaN", "2", "5"];
///
/// let mut first_number = a.iter().find_map(|s| s.parse().ok());
/// let first_number = a.iter().find_map(|s| s.parse().ok());
///
/// assert_eq!(first_number, Some(2));
/// ```
Expand Down

0 comments on commit 18d3f3f

Please sign in to comment.