Skip to content

Fix RemoveAll implementation#26

Merged
iluvadev merged 1 commit intoiluvadev:mainfrom
mtaku3:dev-4
Jan 28, 2023
Merged

Fix RemoveAll implementation#26
iluvadev merged 1 commit intoiluvadev:mainfrom
mtaku3:dev-4

Conversation

@mtaku3
Copy link
Copy Markdown
Collaborator

@mtaku3 mtaku3 commented Jan 26, 2023

Removing a element of enumerable in foreach is not allowed to do. It throws exception if you do that.
PR includes fixes, but I'm not sure this code is covering all. At least, it worked on my environment without any exceptions.

Copy link
Copy Markdown
Owner

@iluvadev iluvadev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!
You are right, a collection used in a foreach must be immutable. A foreach can not be used to add or remove elements.

Sorry for that!

@iluvadev iluvadev merged commit acbf6fe into iluvadev:main Jan 28, 2023
@mtaku3
Copy link
Copy Markdown
Collaborator Author

mtaku3 commented Jan 28, 2023

I appreciate your approval.

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 this pull request may close these issues.

2 participants