]> git.lizzy.rs Git - rust.git/commitdiff
core: Small fix in fold docs
authorUlrik Sverdrup <bluss@users.noreply.github.com>
Mon, 18 Sep 2017 19:18:15 +0000 (21:18 +0200)
committerUlrik Sverdrup <bluss@users.noreply.github.com>
Mon, 18 Sep 2017 19:45:23 +0000 (21:45 +0200)
Adaptors are things that take iterators and adapt them into other
iterators. With this definition, fold is just a usual method, because it
doesn't normally make an iterator.

src/libcore/iter/iterator.rs

index 7c009114afefb969570137a2081e4cc688d2d432..aacc29406b626512fb42baddc89d851670492f15 100644 (file)
@@ -1341,7 +1341,7 @@ fn partition<B, F>(self, mut f: F) -> (B, B) where
         (left, right)
     }
 
-    /// An iterator adaptor that applies a function, producing a single, final value.
+    /// An iterator method that applies a function, producing a single, final value.
     ///
     /// `fold()` takes two arguments: an initial value, and a closure with two
     /// arguments: an 'accumulator', and an element. The closure returns the value that