Skip to content

Commit

Permalink
Rollup merge of #91383 - ScriptDevil:drop-while-doc-alias, r=joshtrip…
Browse files Browse the repository at this point in the history
…lett

Add `drop_while` as doc alias to `Iterator::skip_while`

`skip_while` is commonly referred to as `drop_while` in other languages (clojure/c++/haskell). This recently came up in [Zulip](https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/.E2.9C.94.20DropWhile/near/262203352) as well.

This pull request adds 'drop_while' as a doc-alias for 'skip_while'.

r? `@joshtriplett`
  • Loading branch information
JohnTitor committed Nov 30, 2021
2 parents 898f1e4 + dea3494 commit 28176a4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions library/core/src/iter/traits/iterator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1023,6 +1023,7 @@ pub trait Iterator {
/// assert_eq!(iter.next(), None);
/// ```
#[inline]
#[doc(alias = "drop_while")]
#[stable(feature = "rust1", since = "1.0.0")]
fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>
where
Expand Down

0 comments on commit 28176a4

Please sign in to comment.