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

Iterator methods panic after copy #103

Closed
lthibault opened this issue Feb 10, 2019 · 1 comment
Closed

Iterator methods panic after copy #103

lthibault opened this issue Feb 10, 2019 · 1 comment
Labels

Comments

@lthibault
Copy link

Copying a treeset.Iterator will result in panics when treeset.Iterator.Value() is called. I suspect the same holds for all Iterate() methods.

Because Iterator is stateful, I suggest returning an *Iterator from all Iterate() methods.

@emirpasic emirpasic added the bug label Feb 16, 2019
@emirpasic
Copy link
Owner

@lthibault excuse the late replay, could you provide a sample code that triggers this behaviour?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants