Skip to content

Tracking issue for VecDeque Extras #27788

Closed

Description

@Gankra

This covers the deque_extras blanket feature, which should probably be sharded more in the future. It covers:

  • truncate
  • resize
  • as_slices
  • as_mut_slices
  • swap_back_remove
  • swap_front_remove

Some notes:

  • truncate and resize are strange because they aren't directional (they just truncate off the back). Need work.
  • as_slices and as_mut_slices seem good to go. A bit niche, but so is VecDeque. Maybe move the mut to the end. RFC'd and everything.
  • swap_back_remove and swap_front_remove also seem good to go. Maybe move the directional specifier to the end. RFC'd and everything.

Activity

  1. added
    B-unstableBlocker: Implemented in the nightly compiler and unstable.
    on Aug 13, 2015
  2. eefriedman commented on Sep 2, 2015

    @eefriedman
    Contributor

    shrink_to_fit and insert are now also part of deque_extras.

  3. sfackler commented on Sep 17, 2015

    @sfackler
    Member

    I think we can pretty easily stabilize as_slices and as_mut_slices. Not sure about the others.

  4. alexcrichton commented on Sep 24, 2015

    @alexcrichton
    Member

    This issue is now entering its cycle-long FCP for stabilization in 1.5

    Specifically the as_slices and as_mut_slices along swap_*_remove methods are being considered for stabilization. We are also considering renaming the swapping methods.

  5. added
    final-comment-periodIn the final comment period and will be merged soon unless new substantive objections are raised.
    and removed on Sep 24, 2015
  6. added this to the 1.5 milestone on Oct 1, 2015
  7. llogiq commented on Oct 21, 2015

    @llogiq
    Contributor

    @alexcrichton How should the swapping methods be named?

  8. alexcrichton commented on Oct 21, 2015

    @alexcrichton
    Member

    @llogiq as mentioned in the issue description, the other candidate names would be swap_remove_back and swap_remove_front

  9. alexcrichton commented on Oct 22, 2015

    @alexcrichton
    Member

    The libs team discussed this during triage today and the decision was to stabilize:

    • insert
    • shrink_to_fit
    • as_slices
    • as_mut_slices
    • swap_remove_front (renamed from swap_front_remove)
    • swap_remove_back (renamed from swap_back_remove)
  10. Gankra commented on Oct 22, 2015

    @Gankra
    ContributorAuthor

    Oh, we forgot to discuss as_mut_slices vs as_slices_mut.

    I think we should move muts to the back as much as possible, even if in this case we're making "mutable slices", it's still the _mut variant of as_slices.

  11. alexcrichton commented on Oct 22, 2015

    @alexcrichton
    Member

    Hm I'm not sure I'd follow the same reasoning, in method names types like &mut [T] and *mut T are referred to as mut_slice and mut_ptr. We've always known about this with regards to the _mut-at-the-end convention, so I would feel that these methods are correctly named.

  12. Gankra commented on Oct 22, 2015

    @Gankra
    ContributorAuthor

    Yeah I've been a bit ambivalent about that naming scheme, but I guess it's
    a bit too late for that!

    On Thu, Oct 22, 2015 at 11:18 AM, Alex Crichton notifications@github.com
    wrote:

    Hm I'm not sure I'd follow the same reasoning, in method names types like &mut
    [T] and *mut T are referred to as mut_slice and mut_ptr. We've always
    known about this with regards to the _mut-at-the-end convention, so I
    would feel that these methods are correctly named.

    —
    Reply to this email directly or view it on GitHub
    #27788 (comment).

  13. 6 remaining items

  14. added a commit that references this issue on Oct 25, 2015
  15. removed
    final-comment-periodIn the final comment period and will be merged soon unless new substantive objections are raised.
    on Nov 5, 2015
  16. sfackler commented on Jan 19, 2017

    @sfackler
    Member

    The only remaining unstable methods on VecDeque are truncate and resize. Nominating to stabilize.

    @rfcbot fcp merge

  17. rfcbot commented on Jan 19, 2017

    @rfcbot

    Team member @sfackler has proposed to merge this. The next step is review by the rest of the tagged teams:

    No concerns currently listed.

    Once these reviewers reach consensus, this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

    See this document for info about what commands tagged team members can give me.

  18. rfcbot commented on Jan 23, 2017

    @rfcbot

    🔔 This is now entering its final comment period, as per the review above. 🔔

  19. added
    final-comment-periodIn the final comment period and will be merged soon unless new substantive objections are raised.
    on Jan 23, 2017
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-unstableBlocker: Implemented in the nightly compiler and unstable.T-libs-api[DEPRECATED; DO NOT USE]final-comment-periodIn the final comment period and will be merged soon unless new substantive objections are raised.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions