]> git.lizzy.rs Git - rust.git/commitdiff
don't use unneeded closure
authorSmittyvb <me@smitop.com>
Thu, 27 May 2021 00:38:43 +0000 (20:38 -0400)
committerGitHub <noreply@github.com>
Thu, 27 May 2021 00:38:43 +0000 (20:38 -0400)
Co-authored-by: Alphyr <47725341+a1phyr@users.noreply.github.com>
library/core/src/iter/traits/iterator.rs

index fcb14e9b77294f398ffff9b1ecb3b1f0213698c0..b07296f8878a00a827bc4dff7946ed97d6ade69b 100644 (file)
@@ -2608,7 +2608,7 @@ fn check<T>(
     /// assert_eq!(
     ///     vec![2.4, f32::NAN, 1.3]
     ///         .into_iter()
-    ///         .reduce(|a, b| f32::max(a, b))
+    ///         .reduce(f32::max)
     ///         .unwrap(),
     ///     2.4
     /// );