about summary refs log tree commit diff
diff options
context:
space:
mode:
authorCamelid <camelidcamel@gmail.com>2021-02-07 19:47:38 -0800
committerCamelid <camelidcamel@gmail.com>2021-02-07 19:47:38 -0800
commitbfb027965334e168b50cf5a8940e8f6c671caba4 (patch)
tree8cdd1cf1a351ce12d6108fb2bcab870596e60b0d
parentf7558991adcdf15f1cb1093810c8b05894b12dd3 (diff)
downloadrust-bfb027965334e168b50cf5a8940e8f6c671caba4.tar.gz
rust-bfb027965334e168b50cf5a8940e8f6c671caba4.zip
Better line grouping
-rw-r--r--library/core/src/iter/traits/iterator.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/core/src/iter/traits/iterator.rs b/library/core/src/iter/traits/iterator.rs
index 7affe0c2000..416433e6b7d 100644
--- a/library/core/src/iter/traits/iterator.rs
+++ b/library/core/src/iter/traits/iterator.rs
@@ -1540,8 +1540,8 @@ pub trait Iterator {
     /// ```compile_fail,E0382
     /// let a = [1, 2, 3, 4, 5];
     /// let mut iter = a.iter();
-    /// let sum: i32 = iter.take(3).fold(0, |acc, i| acc + i);
     ///
+    /// let sum: i32 = iter.take(3).fold(0, |acc, i| acc + i);
     /// assert_eq!(sum, 6);
     ///
     /// // Error! We can't use `iter` again because it was moved
@@ -1554,9 +1554,9 @@ pub trait Iterator {
     /// ```
     /// let a = [1, 2, 3, 4, 5];
     /// let mut iter = a.iter();
+    ///
     /// // We add in a call to `by_ref` here so `iter` isn't moved.
     /// let sum: i32 = iter.by_ref().take(3).fold(0, |acc, i| acc + i);
-    ///
     /// assert_eq!(sum, 6);
     ///
     /// // And now we can use `iter` again because we still own it.