Add is_empty function to ExactSizeIterator#34357
Conversation
All other types implementing a `len` functions have `is_empty` already.
|
r? @brson (rust_highfive has picked a reviewer for you, use r? to override) |
src/libcore/iter/traits.rs
Outdated
| lower | ||
| } | ||
|
|
||
| /// |
There was a problem hiding this comment.
rustdoc might not like this leading empty doc comment line :)
|
For adding a method to many iterators we'll likely want to run this through crater to ensure that there's no unexpected fallout if we also decide to merge. |
|
Didn't we see a very similar PR to this one recently (adding is_empty to ... something) and decline to add it? I don't see it by searching old pulls. |
|
Maybe you mean #31877? |
|
Either that or perhaps |
|
The libs team discussed this during triage yesterday and the conclusion was that this is ok to merge pending a crater run |
|
Travis failure looks legit. |
|
Starting a crater run. |
|
@brson May I push a fix for the test failure or does that interfere with the crater run? |
|
@tbu- You can go ahead and push it now. There's a small window where it would have interfered. |
|
https://gist.github.com/anonymous/caaed4862686e93319d5758b73211b54 all false positives. |
7dfe1a6 to
9e2c72f
Compare
9e2c72f to
7b2a03f
Compare
|
@bors r+ |
|
📌 Commit 7b2a03f has been approved by |
Add `is_empty` function to `ExactSizeIterator` All other types implementing a `len` functions have `is_empty` already.
All other types implementing a
lenfunctions haveis_emptyalready.