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 extend_next method to extendable structs #907

Open
Rua opened this issue Apr 14, 2024 · 1 comment · May be fixed by #953
Open

Add extend_next method to extendable structs #907

Rua opened this issue Apr 14, 2024 · 1 comment · May be fixed by #953

Comments

@Rua
Copy link
Contributor

Rua commented Apr 14, 2024

Like the extend method of many standard containers, this would take an iterator of extension structs and add them all:

pub fn extend_next(
    self,
    next: impl IntoIterator<Item = &'a mut dyn ExtendsWhatever>,
) -> Self
@Ralith
Copy link
Collaborator

Ralith commented Apr 14, 2024

That seems like a lot of extra generated code for something that could be addressed with a three-line for loop on the caller's side.

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

Successfully merging a pull request may close this issue.

2 participants