]> git.lizzy.rs Git - rust.git/commitdiff
Fix typo/inaccuracy in the documentation of Iterator::skip_while
authorFrank Steffahn <frank.steffahn@stu.uni-kiel.de>
Thu, 18 Mar 2021 17:58:22 +0000 (18:58 +0100)
committerFrank Steffahn <frank.steffahn@stu.uni-kiel.de>
Thu, 18 Mar 2021 17:58:22 +0000 (18:58 +0100)
One of the examples used to say “this leads to a possibly confusing situation,
where the type of the closure is a double reference” while _actually_ referring to
the type of the closure _argument_.

library/core/src/iter/traits/iterator.rs

index f8504e842ee33b6d198d8595e133c990973f98ff..a07750f4ad1febcba63a15bab2359eb67edae650 100644 (file)
@@ -1012,7 +1012,7 @@ fn peekable(self) -> Peekable<Self>
     ///
     /// Because the closure passed to `skip_while()` takes a reference, and many
     /// iterators iterate over references, this leads to a possibly confusing
-    /// situation, where the type of the closure is a double reference:
+    /// situation, where the type of the closure argument is a double reference:
     ///
     /// ```
     /// let a = [-1, 0, 1];