summary refs log tree commit diff
path: root/library/alloc/src/collections/vec_deque.rs
AgeCommit message (Collapse)AuthorLines
2020-12-10fix unsoundness in `make_contiguous`Bastian Kauschke-5/+13
2020-10-18Auto merge of #76885 - dylni:move-slice-check-range-to-range-bounds, r=KodrAusbors-1/+1
Move `slice::check_range` to `RangeBounds` Since this method doesn't take a slice anymore (#76662), it makes more sense to define it on `RangeBounds`. Questions: - Should the new method be `assert_len` or `assert_length`?
2020-10-16liballoc: VecDeque: Simplify binary_search_by()Vojtech Kral-15/+4
2020-10-16liballoc: VecDeque: Add tracking issue for binary search fnsVojtech Kral-3/+3
2020-10-09liballoc: VecDeque: Add binary search functionsVojtech Kral-1/+149
2020-10-06avoid unnecessary intermediate reference and improve safety commentsRalf Jung-6/+11
2020-10-05make IterMut Send/Sync againRalf Jung-0/+7
2020-10-05VecDeque: avoid more aliasing issues by working with raw pointers instead of ↵Ralf Jung-12/+31
references
2020-10-05VecDeque: fix incorrect &mut aliasing in IterMut::next/next_backRalf Jung-7/+24
2020-10-03Replace some once(x).chain(once(y)) with [x, y] IntoIterScott McMurray-2/+3
Now that we have by-value array iterators...
2020-09-18Rename method to `assert_len`dylni-1/+1
2020-09-18Move `slice::check_range` to `RangeBounds`dylni-1/+1
2020-09-18Move to intra-doc linksDenis Vasilik-21/+27
2020-09-15fix slice::check_range aliasing problemsRalf Jung-5/+1
2020-09-09Rollup merge of #76504 - Flying-Toast:master, r=lcnrTyler Mandry-1/+1
Capitalize safety comments
2020-09-08Capitalize safety commentsFlying-Toast-1/+1
2020-09-08Update library/alloc/src/collections/vec_deque.rs Braden Nelson-1/+1
Replace lshift with multiply Co-authored-by: Mara Bos <m-ou.se@m-ou.se>
2020-09-08Convert MAXIMUM_ZST_CAPACITY to be calculated in amoonheart08-6/+2
const instead of multiple target_pointer_width checks.
2020-09-04Auto merge of #75207 - dylni:add-slice-check-range, r=KodrAusbors-26/+13
Add `slice::check_range` This method is useful for [`RangeBounds`] parameters. It's even been [rewritten](https://github.com/rust-lang/rust/blob/22ee68dc586440f96b76b32fbd6087507c6afdb9/src/librustc_data_structures/sorted_map.rs#L214) [many](https://github.com/rust-lang/rust/blob/22ee68dc586440f96b76b32fbd6087507c6afdb9/library/alloc/src/vec.rs#L1299) [times](https://github.com/rust-lang/rust/blob/22ee68dc586440f96b76b32fbd6087507c6afdb9/library/core/src/slice/mod.rs#L2441) in the standard library, sometimes assuming that the bounds won't be [`usize::MAX`]. For example, [`Vec::drain`] creates an empty iterator when [`usize::MAX`] is used as an inclusive end bound: ```rust assert!(vec![1].drain(..=usize::max_value()).eq(iter::empty())); ``` If this PR is merged, I'll create another to use it for those methods. [`RangeBounds`]: https://doc.rust-lang.org/std/ops/trait.RangeBounds.html [`usize::MAX`]: https://doc.rust-lang.org/std/primitive.usize.html#associatedconstant.MAX [`Vec::drain`]: https://doc.rust-lang.org/std/vec/struct.Vec.html#method.drain
2020-09-02Same typos in vec_dequeAnton-2/+2
2020-09-01Will land in 1.48, not 1.47Jon Gjengset-1/+1
2020-08-24Add more information to safety commentdylni-1/+3
2020-08-16Replace ad hoc implementations with `slice::check_range`dylni-26/+11
2020-07-28Stabilize deque_make_contiguousJon Gjengset-5/+8
Closes #70929.
2020-07-27mv std libs to library/mark-0/+3117