about summary refs log tree commit diff
path: root/src/liballoc/slice.rs
AgeCommit message (Collapse)AuthorLines
2020-07-27mv std libs to library/mark-1069/+0
2020-07-09Rollup merge of #74143 - pickfire:patch-2, r=jonas-schievinkManish Goregaokar-2/+0
Try remove unneeded ToString import in liballoc slice
2020-07-08Remove unneeded ToString import in liballoc sliceIvan Tham-2/+0
2020-07-08Liballoc use vec instead of vectorIvan Tham-3/+3
Keep congruency with other parts, full word vector is rarely used.
2020-06-19`#[deny(unsafe_op_in_unsafe_fn)]` in liballocLeSeulArtichaut-20/+27
2020-04-19Explain why we shouldn't add inline attr to into_vecYuki Okushi-0/+3
2020-04-18Auto merge of #71204 - JohnTitor:into-vec, r=wesleywiserbors-1/+0
perf: Remove inline attribute from `into_vec()` It was introduced in #70565 and is likely related to this perf results: https://perf.rust-lang.org/compare.html?start=1edcfc83c6a08ddc5e63fc652b149baea0236e7c&end=d249d756374737eb014079901ac132f1e1ed905e&stat=instructions:u Let's check if it's related to that. r? @wesleywiser could you kick off perf check? I don't think I can do it.
2020-04-17Remove inline attribute from `into_vec()`Yuki Okushi-1/+0
2020-04-15big-O notation: parenthesis, multiplication and backticksRalf Jung-5/+5
2020-04-14Tighten time complexity on the docmi_sawa-1/+1
2020-04-08Rollup merge of #70565 - Zoxc:inlines-query-system, r=davidtwcoDylan DPC-0/+1
Add inline attributes for functions used in the query system
2020-04-06Use split_at in slice's ToOwned::clone_intoJosh Stone-6/+6
It appears to codegen slightly more efficiently with `split_at` taking two slices at once, rather than slicing across different calls.
2020-04-05Stop importing integer modules in liballocLinus Färnstrand-1/+0
2020-04-03Replace max/min_value() with MAX/MIN assoc constsLinus Färnstrand-1/+1
2020-03-30Add inline attributes for functions used in the query systemJohn Kåre Alsaker-0/+1
2020-03-22don't create variable bindings just to return the bound value immediately ↵Matthias Krüger-2/+1
(clippy::let_and_return)
2019-12-24reuse `capacity` variable in slice::repeatking6cong-4/+4
2019-11-29Format liballoc with rustfmtDavid Tolnay-81/+92
2019-10-02Stabilize `slice::repeat` (feature `repeat_generic_slice`)Lzu Tao-5/+1
2019-10-01Remove unneeded `fn main` blocks from docsLzu Tao-8/+3
2019-07-09Update src/liballoc/slice.rsSimon Sapin-1/+1
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
2019-07-09Update src/liballoc/slice.rsSimon Sapin-1/+1
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
2019-07-09Add joining slices of slices with a slice separator, not just a single itemSimon Sapin-1/+25
2019-07-09Take separator by value in `[T]::join`Simon Sapin-5/+5
2019-07-09Split the SliceConcat trait into Concat and JoinSimon Sapin-17/+57
2019-07-09Remove obsolete “should not have to exist” reasonsSimon Sapin-3/+1
2019-07-05Replace SliceConcatExt trait with inherent methods and SliceConcat helper traitSimon Sapin-60/+69
Before this change `SliceConcatExt` was an unstable extension trait with stable methods. It was in the libstd prelude, so that its methods could be used on the stable channel. This replaces it with inherent methods, which can be used without any addition to the prelude. Since the methods are stable and very generic (with for example a return type that depends on the types of parameters), an helper trait is still needed. But now that trait does not need to be in scope for the methods to be used. Removing this depedency on the libstd prelude allows the methods to be used in `#![no_std]` crate that use liballoc, which does not have its own implicitly-imported prelude.
2019-06-22Rollup merge of #61146 - czipperz:SliceConcatExt-connect-default-to-join, ↵Mazdak Farrokhzad-5/+3
r=sfackler SliceConcatExt::connect defaults to calling join It makes sense to default a deprecated method to the new one. Precedence example is `Error::cause` defaults to calling `Error::source`.
2019-05-27Box::into_vec: use Box::into_raw instead of mem::forgetRalf Jung-5/+4
2019-05-24SliceConcatExt::connect defaults to calling joinChris Gregory-5/+3
2019-05-20Ban multi-trait objects via trait aliases.Alexander Regueiro-4/+4
2019-04-15warn(missing_docs) in liballoc, and add missing docsRalf Jung-0/+10
2019-02-12Revert "Remove mentions of unstable sort_by_cached key from stable ↵Scott McMurray-0/+4
documentation" This reverts commit 9c7b69e17909ceb090a1c4b8882a4e0924a2a755.
2019-02-12Stabilize slice_sort_by_cached_keyScott McMurray-2/+1
2019-02-10libs: doc commentsAlexander Regueiro-3/+3
2019-02-03liballoc: revert nested imports style changes.Mazdak Farrokhzad-14/+11
2019-02-02liballoc: apply uniform_paths.Mazdak Farrokhzad-2/+2
2019-02-02liballoc: prefer imports of borrow from libcore.Mazdak Farrokhzad-1/+2
2019-02-02liballoc: adjust abolute imports + more import fixes.Mazdak Farrokhzad-3/+1
2019-02-02liballoc: refactor & fix some imports.Mazdak Farrokhzad-9/+12
2019-02-02liballoc: cargo check passes on 2018Mazdak Farrokhzad-6/+7
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-09Auto merge of #56463 - ljedrz:slice_concat_join, r=nikicbors-3/+3
slice: tweak concat & join - use `sum` instead of `fold` (readability) - adjust the capacity for `join` - the number of separators is `n - 1`, not `n`; proof: ``` fn main() { let a = [[1, 2], [4, 5]]; let v = a.join(&3); assert_ne!(v.len(), v.capacity()); // len is 5, capacity is 6 } ```
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-5/+5
2018-12-03slice: tweak concat & joinljedrz-3/+3
2018-11-22Auto merge of #53918 - Havvy:doc-sort-by, r=GuillaumeGomezbors-0/+16
Doc total order requirement of sort(_unstable)_by I took the definition of what a total order is from the Ord trait docs. I specifically put "elements of the slice" because if you have a slice of f64s, but know none are NaN, then sorting by partial ord is total in this case. I'm not sure if I should give such an example in the docs or not. r? @GuillaumeGomez
2018-10-18Stabilize slice::rchunks(), rchunks_mut(), rchunks_exact(), rchunk_exact_mut()Sebastian Dröge-1/+1
Fixes #55177
2018-10-18Stabilize slice::chunks_exact() and slice::chunks_exact_mut()Sebastian Dröge-1/+1
Fixes #47115
2018-10-18Add slice::rchunks(), rchunks_mut(), rchunks_exact() and rchunks_exact_mut()Sebastian Dröge-0/+2
These work exactly like the normal chunks iterators but start creating chunks from the end of the slice. See #55177 for the tracking issue
2018-10-05Linkify types in docsHavvy (Ryan Scheel)-1/+1