Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tracking issue for VecDeque Extras #27788

Closed
Gankra opened this issue Aug 13, 2015 · 12 comments
Closed

Tracking issue for VecDeque Extras #27788

Gankra opened this issue Aug 13, 2015 · 12 comments
Labels
B-unstable Blocker: Implemented in the nightly compiler and unstable. final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Milestone

Comments

@Gankra
Copy link
Contributor

Gankra commented Aug 13, 2015

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.
@Gankra Gankra added the B-unstable Blocker: Implemented in the nightly compiler and unstable. label Aug 13, 2015
@aturon aturon added the T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. label Aug 13, 2015
@eefriedman
Copy link
Contributor

shrink_to_fit and insert are now also part of deque_extras.

@sfackler
Copy link
Member

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

@alexcrichton
Copy link
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.

@alexcrichton alexcrichton added final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. and removed I-nominated labels Sep 24, 2015
@steveklabnik steveklabnik added this to the 1.5 milestone Oct 1, 2015
@llogiq
Copy link
Contributor

llogiq commented Oct 21, 2015

@alexcrichton How should the swapping methods be named?

@alexcrichton
Copy link
Member

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

@alexcrichton
Copy link
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)

@Gankra
Copy link
Contributor Author

Gankra commented Oct 22, 2015

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.

@alexcrichton
Copy link
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.

@Gankra
Copy link
Contributor Author

Gankra commented Oct 22, 2015

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).

alexcrichton added a commit to alexcrichton/rust that referenced this issue Oct 25, 2015
This commit stabilizes and deprecates library APIs whose FCP has closed in the
last cycle, specifically:

Stabilized APIs:

* `fs::canonicalize`
* `Path::{metadata, symlink_metadata, canonicalize, read_link, read_dir, exists,
   is_file, is_dir}` - all moved to inherent methods from the `PathExt` trait.
* `Formatter::fill`
* `Formatter::width`
* `Formatter::precision`
* `Formatter::sign_plus`
* `Formatter::sign_minus`
* `Formatter::alternate`
* `Formatter::sign_aware_zero_pad`
* `string::ParseError`
* `Utf8Error::valid_up_to`
* `Iterator::{cmp, partial_cmp, eq, ne, lt, le, gt, ge}`
* `<[T]>::split_{first,last}{,_mut}`
* `Condvar::wait_timeout` - note that `wait_timeout_ms` is not yet deprecated
  but will be once 1.5 is released.
* `str::{R,}MatchIndices`
* `str::{r,}match_indices`
* `char::from_u32_unchecked`
* `VecDeque::insert`
* `VecDeque::shrink_to_fit`
* `VecDeque::as_slices`
* `VecDeque::as_mut_slices`
* `VecDeque::swap_remove_front` - (renamed from `swap_front_remove`)
* `VecDeque::swap_remove_back` - (renamed from `swap_back_remove`)
* `Vec::resize`
* `str::slice_mut_unchecked`
* `FileTypeExt`
* `FileTypeExt::{is_block_device, is_char_device, is_fifo, is_socket}`
* `BinaryHeap::from` - `from_vec` deprecated in favor of this
* `BinaryHeap::into_vec` - plus a `Into` impl
* `BinaryHeap::into_sorted_vec`

Deprecated APIs

* `slice::ref_slice`
* `slice::mut_ref_slice`
* `iter::{range_inclusive, RangeInclusive}`
* `std::dynamic_lib`

Closes rust-lang#27706
Closes rust-lang#27725
cc rust-lang#27726 (align not stabilized yet)
Closes rust-lang#27734
Closes rust-lang#27737
Closes rust-lang#27742
Closes rust-lang#27743
Closes rust-lang#27772
Closes rust-lang#27774
Closes rust-lang#27777
Closes rust-lang#27781
cc rust-lang#27788 (a few remaining methods though)
Closes rust-lang#27790
Closes rust-lang#27793
Closes rust-lang#27796
Closes rust-lang#27810
cc rust-lang#28147 (not all parts stabilized)
bors added a commit that referenced this issue Oct 25, 2015
This commit stabilizes and deprecates library APIs whose FCP has closed in the
last cycle, specifically:

Stabilized APIs:

* `fs::canonicalize`
* `Path::{metadata, symlink_metadata, canonicalize, read_link, read_dir, exists,
   is_file, is_dir}` - all moved to inherent methods from the `PathExt` trait.
* `Formatter::fill`
* `Formatter::width`
* `Formatter::precision`
* `Formatter::sign_plus`
* `Formatter::sign_minus`
* `Formatter::alternate`
* `Formatter::sign_aware_zero_pad`
* `string::ParseError`
* `Utf8Error::valid_up_to`
* `Iterator::{cmp, partial_cmp, eq, ne, lt, le, gt, ge}`
* `<[T]>::split_{first,last}{,_mut}`
* `Condvar::wait_timeout` - note that `wait_timeout_ms` is not yet deprecated
  but will be once 1.5 is released.
* `str::{R,}MatchIndices`
* `str::{r,}match_indices`
* `char::from_u32_unchecked`
* `VecDeque::insert`
* `VecDeque::shrink_to_fit`
* `VecDeque::as_slices`
* `VecDeque::as_mut_slices`
* `VecDeque::swap_remove_front` - (renamed from `swap_front_remove`)
* `VecDeque::swap_remove_back` - (renamed from `swap_back_remove`)
* `Vec::resize`
* `str::slice_mut_unchecked`
* `FileTypeExt`
* `FileTypeExt::{is_block_device, is_char_device, is_fifo, is_socket}`
* `BinaryHeap::from` - `from_vec` deprecated in favor of this
* `BinaryHeap::into_vec` - plus a `Into` impl
* `BinaryHeap::into_sorted_vec`

Deprecated APIs

* `slice::ref_slice`
* `slice::mut_ref_slice`
* `iter::{range_inclusive, RangeInclusive}`
* `std::dynamic_lib`

Closes #27706
Closes #27725
cc #27726 (align not stabilized yet)
Closes #27734
Closes #27737
Closes #27742
Closes #27743
Closes #27772
Closes #27774
Closes #27777
Closes #27781
cc #27788 (a few remaining methods though)
Closes #27790
Closes #27793
Closes #27796
Closes #27810
cc #28147 (not all parts stabilized)
@alexcrichton alexcrichton removed the final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. label Nov 5, 2015
@sfackler
Copy link
Member

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

@rfcbot fcp merge

@rfcbot
Copy link

rfcbot commented Jan 19, 2017

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.

@rfcbot
Copy link

rfcbot commented Jan 23, 2017

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

@rfcbot rfcbot added the final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. label Jan 23, 2017
alexcrichton added a commit to alexcrichton/rust that referenced this issue Jan 26, 2017
This commit applies the stabilization/deprecations of the 1.16.0 release, as
tracked by the rust-lang/rust issue tracker and the final-comment-period tag.

The following APIs were stabilized:

* `VecDeque::truncate`
* `VecDeque::resize`
* `String::insert_str`
* `Duration::checked_{add,sub,div,mul}`
* `str::replacen`
* `SocketAddr::is_ipv{4,6}`
* `IpAddr::is_ipv{4,6}`
* `str::repeat`
* `Vec::dedup_by`
* `Vec::dedup_by_key`
* `Result::unwrap_or_default`
* `<*const T>::wrapping_offset`
* `<*mut T>::wrapping_offset`
* `CommandExt::creation_flags` (on Windows)
* `File::set_permissions`
* `String::split_off`

The following APIs were deprecated

* `EnumSet` - replaced with other ecosystem abstractions, long since unstable

Closes rust-lang#27788
Closes rust-lang#35553
Closes rust-lang#35774
Closes rust-lang#36436
Closes rust-lang#36949
Closes rust-lang#37079
Closes rust-lang#37087
Closes rust-lang#37516
Closes rust-lang#37827
Closes rust-lang#37916
Closes rust-lang#37966
Closes rust-lang#38080
alexcrichton added a commit to alexcrichton/rust that referenced this issue Jan 28, 2017
std: Stabilize APIs for the 1.16.0 release

This commit applies the stabilization/deprecations of the 1.16.0 release, as
tracked by the rust-lang/rust issue tracker and the final-comment-period tag.

The following APIs were stabilized:

* `VecDeque::truncate`
* `VecDeque::resize`
* `String::insert_str`
* `Duration::checked_{add,sub,div,mul}`
* `str::replacen`
* `SocketAddr::is_ipv{4,6}`
* `IpAddr::is_ipv{4,6}`
* `str::repeat`
* `Vec::dedup_by`
* `Vec::dedup_by_key`
* `Result::unwrap_or_default`
* `<*const T>::wrapping_offset`
* `<*mut T>::wrapping_offset`
* `CommandExt::creation_flags` (on Windows)
* `File::set_permissions`
* `String::split_off`

The following APIs were deprecated

* `EnumSet` - replaced with other ecosystem abstractions, long since unstable

Closes rust-lang#27788
Closes rust-lang#35553
Closes rust-lang#35774
Closes rust-lang#36436
Closes rust-lang#36949
Closes rust-lang#37079
Closes rust-lang#37087
Closes rust-lang#37516
Closes rust-lang#37827
Closes rust-lang#37916
Closes rust-lang#37966
Closes rust-lang#38080
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B-unstable Blocker: Implemented in the nightly compiler and unstable. final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

8 participants