Skip to content

Commit 28176a4

Browse files
authored
Rollup merge of #91383 - ScriptDevil:drop-while-doc-alias, r=joshtriplett
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`
2 parents 898f1e4 + dea3494 commit 28176a4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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

+1
Original file line numberDiff line numberDiff line change
@@ -1023,6 +1023,7 @@ pub trait Iterator {
10231023
/// assert_eq!(iter.next(), None);
10241024
/// ```
10251025
#[inline]
1026+
#[doc(alias = "drop_while")]
10261027
#[stable(feature = "rust1", since = "1.0.0")]
10271028
fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>
10281029
where

0 commit comments

Comments
 (0)