Skip to content

Commit d1f422e

Browse files
committed
Auto merge of #31819 - miqid:doc, r=steveklabnik
Hello. I came across some minor spelling mistakes while going through the documentation for the `Iterator` trait. Also includes a suggested styling fix. r? @steveklabnik
2 parents 98a59cf + 4d2a816 commit d1f422e

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/libcore/iter.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1428,7 +1428,7 @@ pub trait Iterator {
14281428
/// assert_eq!(6, doubled[2]);
14291429
/// ```
14301430
///
1431-
/// Using the 'turbofish' instead of annotationg `doubled`:
1431+
/// Using the 'turbofish' instead of annotating `doubled`:
14321432
///
14331433
/// ```
14341434
/// let a = [1, 2, 3];
@@ -1610,7 +1610,7 @@ pub trait Iterator {
16101610
/// `true`, then so does `all()`. If any of them return `false`, it
16111611
/// returns `false`.
16121612
///
1613-
/// `all()` is short-circuting; in other words, it will stop processing
1613+
/// `all()` is short-circuiting; in other words, it will stop processing
16141614
/// as soon as it finds a `false`, given that no matter what else happens,
16151615
/// the result will also be `false`.
16161616
///
@@ -1660,7 +1660,7 @@ pub trait Iterator {
16601660
/// `true`, then so does `any()`. If they all return `false`, it
16611661
/// returns `false`.
16621662
///
1663-
/// `any()` is short-circuting; in other words, it will stop processing
1663+
/// `any()` is short-circuiting; in other words, it will stop processing
16641664
/// as soon as it finds a `true`, given that no matter what else happens,
16651665
/// the result will also be `true`.
16661666
///
@@ -1711,7 +1711,7 @@ pub trait Iterator {
17111711
/// `true`, then `find()` returns `Some(element)`. If they all return
17121712
/// `false`, it returns `None`.
17131713
///
1714-
/// `find()` is short-circuting; in other words, it will stop processing
1714+
/// `find()` is short-circuiting; in other words, it will stop processing
17151715
/// as soon as the closure returns `true`.
17161716
///
17171717
/// Because `find()` takes a reference, and many iterators iterate over
@@ -1762,7 +1762,7 @@ pub trait Iterator {
17621762
/// returns `true`, then `position()` returns `Some(index)`. If all of
17631763
/// them return `false`, it returns `None`.
17641764
///
1765-
/// `position()` is short-circuting; in other words, it will stop
1765+
/// `position()` is short-circuiting; in other words, it will stop
17661766
/// processing as soon as it finds a `true`.
17671767
///
17681768
/// # Overflow Behavior
@@ -1824,7 +1824,7 @@ pub trait Iterator {
18241824
/// and if one of them returns `true`, then `rposition()` returns
18251825
/// `Some(index)`. If all of them return `false`, it returns `None`.
18261826
///
1827-
/// `rposition()` is short-circuting; in other words, it will stop
1827+
/// `rposition()` is short-circuiting; in other words, it will stop
18281828
/// processing as soon as it finds a `true`.
18291829
///
18301830
/// # Examples
@@ -2079,7 +2079,7 @@ pub trait Iterator {
20792079
(ts, us)
20802080
}
20812081

2082-
/// Creates an iterator which clone()s all of its elements.
2082+
/// Creates an iterator which `clone()`s all of its elements.
20832083
///
20842084
/// This is useful when you have an iterator over `&T`, but you need an
20852085
/// iterator over `T`.

0 commit comments

Comments
 (0)