Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

with_value and into_parts for PushBackN #119

Open
kindlychung opened this issue May 10, 2016 · 0 comments
Open

with_value and into_parts for PushBackN #119

kindlychung opened this issue May 10, 2016 · 0 comments

Comments

@kindlychung
Copy link
Contributor

kindlychung commented May 10, 2016

Would be nice to have these implemented for PushBackN:

    /// Create a `PutBackN` along with the `value` to put back.
    #[inline]
    pub fn with_value(value: Vec<I::Item>, it: I) -> Self {
        PutBackN {
            top: value,
            iter: it,
        }
    }

    /// Split the `PutBackN` into its parts.
    #[inline]
    pub fn into_parts(self) -> (Vec<I::Item>, I) {
        let PutBackN{top, iter} = self;
        (top, iter)
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant