1. 14 12月, 2021 1 次提交
  2. 01 11月, 2021 4 次提交
  3. 31 10月, 2021 1 次提交
  4. 22 10月, 2021 1 次提交
  5. 12 10月, 2021 2 次提交
    • M
      Make split_inclusive() on an empty slice yield an empty output · f6e4c742
      Martin von Zweigbergk 提交于
      `[].split_inclusive()` currently yields a single, empty slice. That's
      different from `"".split_inslusive()`, which yields no output at
      all. I think that makes the slice version harder to use.
      
      The case where I ran into this bug was when writing code for
      generating a diff between two slices of bytes. I wanted to prefix
      removed lines with "-" and a added lines with "+". Due to
      `split_inclusive()`'s current behavior, that means that my code prints
      just a "-" or "+" for empty files. I suspect most existing callers
      have similar "bugs" (which would be fixed by this patch).
      
      Closes #89716.
      f6e4c742
    • J
      Add #[must_use] to as_type conversions · 06e625f7
      John Kugelman 提交于
      06e625f7
  6. 11 10月, 2021 1 次提交
  7. 12 8月, 2021 1 次提交
    • F
      Test and fix size_hint for slice's [r]split* iterators · 31e49f02
      Frank Steffahn 提交于
      Adds extensive test for all the [r]split* iterators.
      Fixes size_hint upper bound for split_inclusive* iterators which was one higher than necessary for non-empty slices.
      Fixes size_hint lower bound for [r]splitn* iterators when n==0, which was one too high.
      31e49f02
  8. 28 7月, 2021 1 次提交
  9. 26 7月, 2021 1 次提交
  10. 03 7月, 2021 1 次提交
  11. 17 6月, 2021 1 次提交
  12. 22 3月, 2021 1 次提交
  13. 05 3月, 2021 1 次提交
  14. 27 2月, 2021 1 次提交
    • W
      Add `as_str` method for split whitespace str iterators · 12d6238f
      Waffle 提交于
      This commit adds `as_str` methods to `SplitWhitespace` and `SplitAsciiWhitespace`
      str iterators. The methods return the remainder, similar to `as_str` methods on
      `Chars` and other split iterators.
      
      This commit also makes fields of some iterators `pub(crate)`.
      12d6238f
  15. 26 2月, 2021 1 次提交
  16. 16 2月, 2021 1 次提交
    • T
      Turn may_have_side_effect into an associated constant · dc3304c3
      Tomasz Miąsko 提交于
      The `may_have_side_effect` is an implementation detail of `TrustedRandomAccess`
      trait. It describes if obtaining an iterator element may have side effects. It
      is currently implemented as an associated function.
      
      Turn `may_have_side_effect` into an associated constant. This makes the
      value immediately available to the optimizer.
      dc3304c3
  17. 13 1月, 2021 1 次提交
  18. 08 1月, 2021 2 次提交
  19. 05 1月, 2021 1 次提交
  20. 31 12月, 2020 1 次提交
  21. 11 12月, 2020 3 次提交
  22. 10 12月, 2020 6 次提交
  23. 06 10月, 2020 1 次提交
  24. 05 10月, 2020 1 次提交
    • S
      Add [T]::as_chunks_mut (as unstable) · 652f34d2
      Scott McMurray 提交于
      Allows getting the slices directly, rather than just through an iterator as in `array_chunks(_mut)`.  The constructors for those iterators are then written in terms of these methods, so the iterator constructors no longer have any `unsafe` of their own.
      652f34d2
  25. 26 9月, 2020 2 次提交
  26. 18 9月, 2020 2 次提交