| Age | Commit message (Collapse) | Author | Lines | |
|---|---|---|---|---|
| 2021-03-08 | Closer similarities. | Giles Cope | -26/+16 | |
| 2021-03-08 | Update library/alloc/src/string.rs | Squirrel | -6/+3 | |
| Co-authored-by: LingMan <LingMan@users.noreply.github.com> | ||||
| 2021-03-07 | Add documentation for string->Cow conversions | Michael Howell | -0/+33 | |
| Mostly, it's just to reassure everyone that these functions don't allocate. Part of #51430 | ||||
| 2021-03-07 | vec![0;4] is a fast path. | Giles Cope | -22/+20 | |
| After much tweaking found a way to get similar asm size as the u8 to_string implementation. | ||||
| 2021-03-05 | Implement String::remove_matches | Josh Cotton | -0/+56 | |
| 2021-03-04 | less uB in i8 | Giles Cope | -2/+6 | |
| 2021-03-04 | Alternative LUT rather than dividing. | Giles Cope | -1/+34 | |
| 2021-02-27 | u8::to_string() specialisation (far less asm). | Giles Cope | -0/+19 | |
| 2021-02-26 | Fix invalid slice access in String::retain | Giacomo Stevanato | -15/+22 | |
| 2021-02-25 | Convert primitives to use intra-doc links | Joshua Nelson | -1/+1 | |
| 2021-02-23 | Rollup merge of #82128 - anall:feature/add_diagnostic_items, r=davidtwco | Dylan 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-16 | a few more diagnostic items | Andrea Nall | -0/+1 | |
| 2021-02-12 | Rename `Range::ensure_subset_of` to `slice::range` | dylni | -2/+3 | |
| 2021-02-12 | Fix possible soundness issue in `ensure_subset_of` | dylni | -1/+1 | |
| 2021-02-12 | Improve design of `assert_len` | dylni | -2/+2 | |
| 2021-01-31 | Fix small typo | Sebastian Widua | -1/+1 | |
| 2021-01-26 | shrink_to shouldn't panic on len greater than capacity | Thom Wiggers | -2/+1 | |
| 2021-01-22 | Add doc aliases for memory allocations | Yoshua Wuyts | -0/+2 | |
| - Vec::with_capacity / Box::new -> alloc + malloc - Box::new_zeroed -> calloc - Vec::{reserve,reserve_exact,try_reserve_exact,shrink_to_fit,shrink_to} -> realloc | ||||
| 2021-01-18 | Fix soundness issue for `replace_range` and `range` | dylni | -3/+10 | |
| 2020-12-28 | Add "length" as doc alias to len methods | Konrad Borowski | -0/+1 | |
| 2020-12-09 | Clarify that String::split_at takes a byte index. | Corey Farwell | -1/+1 | |
| 2020-10-29 | Prevent String::retain from creating non-utf8 strings when abusing panic | Giacomo Stevanato | -4/+6 | |
| 2020-10-22 | Clean up lib docs | Camelid | -9/+10 | |
| 2020-10-18 | Auto merge of #76885 - dylni:move-slice-check-range-to-range-bounds, r=KodrAus | bors | -3/+2 | |
| 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-16 | Remove shrink_to_fit from default ToString::to_string implementation. | Mara Bos | -1/+0 | |
| Co-authored-by: scottmcm <scottmcm@users.noreply.github.com> | ||||
| 2020-09-19 | Rollup merge of #76525 - fusion-engineering-forks:string-drain, r=dtolnay | Ralf Jung | -1/+35 | |
| Add as_str() to string::Drain. Vec's Drain recently [had its `.as_slice()` stabilized](https://github.com/rust-lang/rust/pull/72584), but String's Drain was still missing the analogous `.as_str()`. This adds that. Also improves the Debug implementation, which now shows the remaining data instead of just `"Drain { .. }"`. | ||||
| 2020-09-19 | Add tracking issue number for string_drain_as_str. | Mara Bos | -3/+3 | |
| 2020-09-18 | Rename method to `assert_len` | dylni | -2/+2 | |
| 2020-09-18 | Move `slice::check_range` to `RangeBounds` | dylni | -3/+2 | |
| 2020-09-15 | fix slice::check_range aliasing problems | Ralf Jung | -1/+2 | |
| 2020-09-09 | Disable AsRef implementations for String's Drain. | Mara Bos | -14/+15 | |
| Since trait implementations cannot be unstable, we should only add them when the as_str feature gets stabilized. Until then, only `.as_str()` is available (behind a feature gate). | ||||
| 2020-09-09 | Mark AsRef impls for String's Drain as stable. | Mara Bos | -2/+2 | |
| Trait implementations effectively can't be #[unstable]. | ||||
| 2020-09-09 | Add AsRef<[u8]> for String's Drain. | Mara Bos | -0/+7 | |
| 2020-09-09 | Show remaining data in string::Drain's Debug impl. | Mara Bos | -1/+1 | |
| 2020-09-09 | Add as_str() and AsRef to string::Drain. | Mara Bos | -0/+26 | |
| 2020-09-04 | Auto merge of #75207 - dylni:add-slice-check-range, r=KodrAus | bors | -14/+6 | |
| 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-08-23 | Convert from str -> prim@str for `alloc` | Joshua Nelson | -5/+7 | |
| 2020-08-16 | Replace ad hoc implementations with `slice::check_range` | dylni | -14/+6 | |
| 2020-07-29 | Explain why inline default ToString impl | Lzu Tao | -0/+3 | |
| 2020-07-27 | mv std libs to library/ | mark | -0/+2504 | |
