about summary refs log tree commit diff
path: root/library/alloc/src/collections/vec_deque/iter.rs
AgeCommit message (Collapse)AuthorLines
2024-11-19Rollup merge of #123947 - zopsicle:vec_deque-Iter-as_slices, r=AmanieuMatthias Krüger-0/+34
Add vec_deque::Iter::as_slices and friends Add the following methods, that work similarly to VecDeque::as_slices: - alloc::collections::vec_deque::Iter::as_slices - alloc::collections::vec_deque::IterMut::into_slices - alloc::collections::vec_deque::IterMut::as_slices - alloc::collections::vec_deque::IterMut::as_mut_slices Obtaining slices from a VecDeque iterator was not previously possible.
2024-09-08Remove needless returns detected by clippy in librariesEduardo Sánchez Muñoz-2/+2
2024-09-03replace placeholder versionBoxy-1/+1
2024-07-27Okay, I guess I have to give these a different feature nameltdk-1/+1
2024-07-27impl Default for collection iterators that don't already have itltdk-0/+14
2024-04-15Add vec_deque::Iter::as_slices and friendschloekek-0/+34
Add the following methods, that work similarly to VecDeque::as_slices: - alloc::collections::vec_deque::Iter::as_slices - alloc::collections::vec_deque::IterMut::into_slices - alloc::collections::vec_deque::IterMut::as_slices - alloc::collections::vec_deque::IterMut::as_mut_slices Obtaining slices from a VecDeque iterator was not previously possible.
2024-02-15Use generic `NonZero` internally.Markus Reiter-3/+3
2023-03-27replace advance_by returning usize with Result<(), NonZeroUsize>The 8472-11/+15
2023-03-27Change advance(_back)_by to return `usize` instead of `Result<(), usize>`The 8472-13/+12
A successful advance is now signalled by returning `0` and other values now represent the remaining number of steps that couldn't be advanced as opposed to the amount of steps that have been advanced during a partial advance_by. This simplifies adapters a bit, replacing some `match`/`if` with arithmetic. Whether this is beneficial overall depends on whether `advance_by` is mostly used as a building-block for other iterator methods and adapters or whether we also see uses by users where `Result` might be more useful.
2022-11-25Changes according to code reviewMarkus Everling-16/+14
2022-11-20Update VecDeque implementationMarkus Everling-106/+70
2022-05-30Rollup merge of #89685 - DeveloperC286:iter_fields_to_private, r=oli-obkMichael Goulet-3/+9
refactor: VecDeques Iter fields to private Made the fields of VecDeque's Iter private by creating a Iter::new(...) function to create a new instance of Iter and migrating usage to use Iter::new(...).
2022-05-08Warn on unused doc(hidden) on trait impl itemsLeón Orell Valerian Liehr-1/+0
2022-03-14refactor: VecDeques Iter fields to privateDeveloperC-3/+9
Made the fields of VecDeque's Iter private by creating a Iter::new(...) function to create a new instance of Iter and migrating usage to use Iter::new(...).
2022-03-10Use MaybeUninit in VecDeque to remove the undefined behavior of sliceJmPotato-19/+50
Signed-off-by: JmPotato <ghzpotato@gmail.com>
2021-07-28Remove redundant bounds on get_unchecked for vec_deque iterators, and run fmtFrank Steffahn-5/+2
2021-07-28Add TrustedRandomAccessNoCoerce supertrait without requirements or ↵Frank Steffahn-2/+6
guarantees about subtype coercions Update all the TrustedRandomAccess impls to also implement the new supertrait
2021-06-16Add doc(hidden) to all __iterator_get_uncheckedJacob Hoffman-Andrews-0/+1
This method on the Iterator trait is doc(hidden), and about half of implementations were doc(hidden). This adds the attribute to the remaining implementations.
2021-05-06Perf Experiment: Wait, what if I just skip the trait aliasScott McMurray-3/+3
2021-05-06Bootstrapping preparation for the libraryScott McMurray-3/+3
Since just `ops::Try` will need to change meaning.
2021-03-21implement TrustedLen and TrustedRandomAccess for VecDeque iteratorsThe8472-1/+23
2020-11-13refactor: vec_deque ignore-tidy-filelengthC-0/+159
commit c547d5fabcd756515afa7263ee5304965bb4c497 Author: C <DeveloperC@protonmail.com> Date: Sat Oct 31 11:22:23 2020 +0000 test: updating ui/hygiene/panic-location.rs expected commit 2af03769c4ffdbbbad75197a1ad0df8c599186be Author: C <DeveloperC@protonmail.com> Date: Sat Oct 31 10:43:30 2020 +0000 fix: documentation unresolved link commit c4b0df361ce27d7392d8016229f2e0265af32086 Author: C <DeveloperC@protonmail.com> Date: Sat Oct 31 02:58:31 2020 +0000 style: compiling with Rust's style guidelines commit bdd2de5f3c09b49a18e3293f2457fcab25557c96 Author: C <DeveloperC@protonmail.com> Date: Sat Oct 31 02:56:31 2020 +0000 refactor: removing ignore-tidy-filelength commit fcc4b3bc41f57244c65ebb8e4efe4cbc9460b5a9 Author: C <DeveloperC@protonmail.com> Date: Sat Oct 31 02:51:35 2020 +0000 refactor: moving trait RingSlices to ring_slices.rs commit 2f0cc539c06d8841baf7f675168f68ca7c21e68e Author: C <DeveloperC@protonmail.com> Date: Sat Oct 31 02:46:09 2020 +0000 refactor: moving struct PairSlices to pair_slices.rs commit a55d3ef1dab4c3d85962b3a601ff8d1f7497faf2 Author: C <DeveloperC@protonmail.com> Date: Sat Oct 31 02:31:45 2020 +0000 refactor: moving struct Iter to iter.rs commit 76ab33a12442a03726f36f606b4e0fe70f8f246b Author: C <DeveloperC@protonmail.com> Date: Sat Oct 31 02:24:32 2020 +0000 refactor: moving struct IntoIter into into_iter.rs commit abe0d9eea2933881858c3b1bc09df67cedc5ada5 Author: C <DeveloperC@protonmail.com> Date: Sat Oct 31 02:19:07 2020 +0000 refactor: moving struct IterMut into iter_mut.rs commit 70ebd6420335e1895e2afa2763a0148897963e24 Author: C <DeveloperC@protonmail.com> Date: Sat Oct 31 01:49:15 2020 +0000 refactor: moved macros into macros.rs commit b08dd2add994b04ae851aa065800bd8bd6326134 Author: C <DeveloperC@protonmail.com> Date: Sat Oct 31 01:05:36 2020 +0000 refactor: moving vec_deque.rs to vec_deque/mod.rs