about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSmittyvb <me@smitop.com>2021-05-26 20:38:50 -0400
committerGitHub <noreply@github.com>2021-05-26 20:38:50 -0400
commitb00f6fc8a16656391f9014cda73b24712eaf2ccb (patch)
treed4bbfc2c149d2ef135ed40d7b645f49a8caddd80
parent7146a05a43c0baa6bd566ce614491535a6ba4ca2 (diff)
downloadrust-b00f6fc8a16656391f9014cda73b24712eaf2ccb.tar.gz
rust-b00f6fc8a16656391f9014cda73b24712eaf2ccb.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 b07296f8878..556576f3171 100644
--- a/library/core/src/iter/traits/iterator.rs
+++ b/library/core/src/iter/traits/iterator.rs
@@ -2646,7 +2646,7 @@ pub trait Iterator {
     /// assert_eq!(
     ///     vec![2.4, f32::NAN, 1.3]
     ///         .into_iter()
-    ///         .reduce(|a, b| f32::min(a, b))
+    ///         .reduce(f32::min)
     ///         .unwrap(),
     ///     1.3
     /// );