summary refs log tree commit diff
path: root/library/alloc/src/slice.rs
AgeCommit message (Collapse)AuthorLines
2021-03-09convert slice doc link to intra-doc linksFrançois Mockers-5/+5
2021-02-25Convert primitives to use intra-doc linksJoshua Nelson-11/+11
2021-02-23Rollup merge of #82128 - anall:feature/add_diagnostic_items, r=davidtwcoDylan DPC-0/+1
add diagnostic items for OsString/PathBuf/Owned as well as to_vec on slice This is adding diagnostic items to be used by rust-lang/rust-clippy#6730, but my understanding is the clippy-side change does need to be done over there since I am adding a new clippy feature. Add diagnostic items to the following types: OsString (os_string_type) PathBuf (path_buf_type) Owned (to_owned_trait) As well as the to_vec method on slice/[T]
2021-02-15requested/proposed changesAndrea Nall-1/+1
2021-02-15add diagnostic itemsAndrea Nall-0/+1
Add diagnostic items to the following types: OsString (os_string_type) PathBuf (path_buf_type) Owned (to_owned_trait) As well as the to_vec method on slice/[T]
2021-02-12Rename `Range::ensure_subset_of` to `slice::range`dylni-0/+2
2020-12-31Replace the tracking issue for the slice_group_by featureClément Renault-1/+1
2020-12-10Fix the fmt issuesClément Renault-2/+2
2020-12-10Use none as the issue instead of 0Clément Renault-1/+1
2020-12-10Introduce the GroupBy and GroupByMut IteratorsClément Renault-0/+2
2020-12-04 Rename `AllocRef` to `Allocator` and `(de)alloc` to `(de)allocate`Tim Diekmann-12/+12
2020-11-22Change slice::to_vec to not use extend_from_slicekadmin-7/+59
This also required adding a loop guard in case clone panics Add specialization for copy There is a better version for copy, so I've added specialization for that function and hopefully that should speed it up even more. Switch FromIter<slice::Iter> to use `to_vec` Test different unrolling version for to_vec Revert to impl From benchmarking, it appears this version is faster
2020-11-18Add support for custom allocators in `Vec`Tim Diekmann-8/+33
2020-10-23Rollup merge of #77969 - ryan-scott-dev:bigo-notation-consistency, r=m-ou-seYuki Okushi-7/+7
Doc formating consistency between slice sort and sort_unstable, and big O notation consistency Updated documentation for slice sorting methods to be consistent between stable and unstable versions, which just ended up being minor formatting differences. I also went through and updated any doc comments with big O notation to be consistent with #74010 by italicizing them rather than having them in a code block.
2020-10-15Made slice sort documentation consistent between stable and unstable versionsRyan Scott-7/+7
2020-09-18Move `slice::check_range` to `RangeBounds`dylni-2/+0
2020-09-16Rollup merge of #75026 - JulianKnodt:array_windows, r=AmanieuTyler Mandry-0/+2
Add array_windows fn This mimicks the functionality added by array_chunks, and implements a const-generic form of `windows`. It makes egregious use of `unsafe`, but by necessity because the array must be re-interpreted as a slice of arrays, and unlike array_chunks this cannot be done by casting the original array once, since each time the index is advanced it needs to move one element, not `N`. I'm planning on adding more tests, but this should be good enough as a premise for the functionality. Notably: should there be more functions overwritten for the iterator implementation/in general? ~~I've marked the issue as #74985 as there is no corresponding exact issue for `array_windows`, but it's based of off `array_chunks`.~~ Edit: See Issue #75027 created by @lcnr for tracking issue ~~Do not merge until I add more tests, please.~~ r? @lcnr
2020-09-16Add array window fnkadmin-0/+2
Updated issue to #75027 Update to rm oob access And hopefully fix docs as well Fixed naming conflict in test Fix test which used 1-indexing Nth starts from 0, woops Fix a bunch of off by 1 errors See https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=757b311987e3fae1ca47122969acda5a Add even more off by 1 errors And also write `next` and `next_back` in terms of `nth` and `nth_back`. Run fmt Fix forgetting to change fn name in test add nth_back test & document unsafe Remove as_ref().unwrap() Documented occurrences of unsafe, noting what invariants are maintained
2020-09-15fix slice::check_range aliasing problemsRalf Jung-0/+2
2020-09-04Re-export ArrayChunksMut in allocJosh Stone-0/+2
2020-08-21Use intra-doc-links in `alloc`LeSeulArtichaut-7/+3
2020-08-01add tracking issueBastian Kauschke-1/+1
2020-07-30liballoc export ArrayChunksBastian Kauschke-0/+2
2020-07-27mv std libs to library/mark-0/+1069