Tracking Issue for `Iterator::intersperse`
<!-- homu-ignore:start --> *[View all comments](https://triagebot.infra.rust-lang.org/gh-comments/rust-lang/rust/issues/79524)* <!-- homu-ignore:end --> This is a tracking issue for the `Iterator::intersperse` and `intersperse_with` methods. It is based on `itertools::intersperse` and is the iterator equivalent of `Vec::join`. The feature gate for the issue is `#![feature(iter_intersperse)]`. ### Public API ```rust // core::iter pub trait Iterator { fn intersperse(self, separator: Self::Item) -> Intersperse<Self> where Self: Sized, Self::Item: Clone; fn intersperse_with<G>(self, separator: G) -> IntersperseWith<Self, G> where Self: Sized, G: FnMut() -> Self::Item; } #[derive(Debug, Clone)] pub struct Intersperse<I: Iterator> where I::Item: Clone {} impl<I> Iterator for Intersperse<I> where I: Iterator, I::Item: Clone { type Item = I::Item; } pub struct IntersperseWith<I, G> where I: Iterator {} impl<I, G> Debug for IntersperseWith<I, G> where I: Iterator + Debug, I::Item: Debug, G: Debug {} impl<I, G> Clone for IntersperseWith<I, G> where I: Iterator + Clone, I::Item: Clone, G: Clone {} impl<I, G> Iterator for IntersperseWith<I, G> where I: Iterator, G: FnMut() -> I::Item { type Item = I::Item; } ``` ### Steps / History <!-- Include each step required to complete the feature. Typically this is a PR implementing a feature, followed by a PR that stabilises the feature. However for larger features an implementa
Posted by camelid on Nov 28, 2020, 11:51 PM
Tags
Related issues
- Custom games stuck on "finding server" for all european servers
- Feature request: add ACP (Agent Client Protocol) stdio JSON-RPC mode
- Forza Horizon 6 (2483190)
- Turn off integrated browser for default
- Weekly updates are too frequent
- [BUG] Max 20x plan: 100% usage after 2 hours of light work (5 commits, no agents)
Raise real-world problems, find people facing the same issue, and discuss solutions.3,000 issues0 comments
github (Sysadmin)
Custom games stuck on "finding server" for all european servers
Feature request: add ACP (Agent Client Protocol) stdio JSON-RPC mode
Forza Horizon 6 (2483190)
Turn off integrated browser for default
Weekly updates are too frequent
[BUG] Max 20x plan: 100% usage after 2 hours of light work (5 commits, no agents)
Add gemini-3.1-pro-preview
[TF2] Feature request: Bring Back Quickplay
Tracking Issue for `Iterator::intersperse`
<!-- homu-ignore:start --> *[View all comments](https://triagebot.infra.rust-lang.org/gh-comments/rust-lang/rust/issues/79524)* <!-- homu-ignore:end --> This is a tracking issue for the `Iterator::intersperse` and `intersperse_with` methods. It is based on `itertools::intersperse` and is the iterator equivalent of `Vec::join`. The feature gate for the issue is `#![feature(iter_intersperse)]`. ### Public API ```rust // core::iter pub trait Iterator { fn intersperse(self, separator: Self::Item) -> Intersperse<Self> where Self: Sized, Self::Item: Clone; fn intersperse_with<G>(self, separator: G) -> IntersperseWith<Self, G> where Self: Sized, G: FnMut() -> Self::Item; } #[derive(Debug, Clone)] pub struct Intersperse<I: Iterator> where I::Item: Clone {} impl<I> Iterator for Intersperse<I> where I: Iterator, I::Item: Clone { type Item = I::Item; } pub struct IntersperseWith<I, G> where I: Iterator {} impl<I, G> Debug for IntersperseWith<I, G> where I: Iterator + Debug, I::Item: Debug, G: Debug {} impl<I, G> Clone for IntersperseWith<I, G> where I: Iterator + Clone, I::Item: Clone, G: Clone {} impl<I, G> Iterator for IntersperseWith<I, G> where I: Iterator, G: FnMut() -> I::Item { type Item = I::Item; } ``` ### Steps / History <!-- Include each step required to complete the feature. Typically this is a PR implementing a feature, followed by a PR that stabilises the feature. However for larger features an implementa
Comments (0)
No comments yet. Start the discussion.