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

Add a slice append method #2239

Closed
jfecher opened this issue Aug 9, 2023 · 0 comments · Fixed by #2241
Closed

Add a slice append method #2239

jfecher opened this issue Aug 9, 2023 · 0 comments · Fixed by #2241
Assignees
Labels
enhancement New feature or request

Comments

@jfecher
Copy link
Contributor

jfecher commented Aug 9, 2023

Problem

We have a slice_push_back builtin but it'd also be helpful to have a append method to slices that loops over a slice and adds it to the end of another.

Happy Case

This does not need to be builtin:

fn append(mut self, other: Self) -> Self {
    for elem in other {
        self = self.push_back(elem);
    }
    self
}

Alternatives Considered

No response

Additional Context

No response

Would you like to submit a PR for this Issue?

No

Support Needs

No response

@jfecher jfecher added the enhancement New feature or request label Aug 9, 2023
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Noir Aug 9, 2023
@jfecher jfecher self-assigned this Aug 9, 2023
@jfecher jfecher changed the title Add a slice concat method Add a slice append method Aug 9, 2023
@jfecher jfecher mentioned this issue Aug 9, 2023
5 tasks
@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in Noir Aug 9, 2023
@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in Noir Aug 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant