about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSmittyvb <me@smitop.com>2021-05-26 20:38:43 -0400
committerGitHub <noreply@github.com>2021-05-26 20:38:43 -0400
commit7146a05a43c0baa6bd566ce614491535a6ba4ca2 (patch)
treed5a1d145567e82afb4b1830985233e05a40c8023
parente7a3ada210727a6df1de38299e2177057ff43cef (diff)
downloadrust-7146a05a43c0baa6bd566ce614491535a6ba4ca2.tar.gz
rust-7146a05a43c0baa6bd566ce614491535a6ba4ca2.zip
don't use unneeded closure
Co-authored-by: Alphyr <47725341+a1phyr@users.noreply.github.com>
-rw-r--r--library/core/src/iter/traits/iterator.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/core/src/iter/traits/iterator.rs b/library/core/src/iter/traits/iterator.rs
index fcb14e9b772..b07296f8878 100644
--- a/library/core/src/iter/traits/iterator.rs
+++ b/library/core/src/iter/traits/iterator.rs
@@ -2608,7 +2608,7 @@ pub trait Iterator {
     /// assert_eq!(
     ///     vec![2.4, f32::NAN, 1.3]
     ///         .into_iter()
-    ///         .reduce(|a, b| f32::max(a, b))
+    ///         .reduce(f32::max)
     ///         .unwrap(),
     ///     2.4
     /// );