Skip to content

Tracking issue for the Peekable::is_empty function #32111

Closed

Description

@alexcrichton

This is a tracking issue for the peekable_is_empty feature which is the Peekable::is_empty function on iterators.

Activity

  1. added
    T-libs-api
    B-unstable
    on Mar 8, 2016
  2. oyvindln commented on Apr 23, 2016

    @oyvindln
    Contributor

    What is blocking this from being stabilised?

  3. sfackler commented on Apr 23, 2016

    @sfackler
    Member

    Nothing in particular other than that we haven't gotten to it yet.

  4. alexcrichton commented on Apr 29, 2016

    @alexcrichton
    MemberAuthor

    🔔 This issue is now entering its cycle-long final comment period for deprecation 🔔

    The libs team discussed this and concluded:

    • The API is somewhat non-conventional by having an is_* query taking &mut self and mutate state.
    • This is different from collections is_empty methods in the sense that the signature is different and there is no corresponding len
    • It's the same as .peek().is_none() which is also very easy to call.
  5. added
    final-comment-period
    and removed on Apr 29, 2016
  6. alexcrichton commented on May 17, 2016

    @alexcrichton
    MemberAuthor

    The libs team discussed this at triage yesterday and the decision was to deprecate

  7. added a commit that references this issue on May 24, 2016
    cae91d7
  8. added a commit that references this issue on May 26, 2016
    a2141e2
  9. Ms2ger commented on Jun 2, 2016

    @Ms2ger
    Contributor

    .peek().is_none() is a positively horrible way of expressing the "is empty" predicate. Can we revert this, please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    B-unstableT-libs-apifinal-comment-period

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions