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 VisitMap::unvisit as proposed in #610 #611

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

aalekhpatel07
Copy link

@aalekhpatel07 aalekhpatel07 commented Jan 15, 2024

Implement the VisitMap::unvisit method as proposed in #610 .

Signed-off-by: Aalekh Patel <aalekh.gwpeck.7998@icloud.com>
Signed-off-by: Aalekh Patel <aalekh.gwpeck.7998@icloud.com>
@aalekhpatel07 aalekhpatel07 changed the title Add VisitMap::unmark as proposed in #610 Add VisitMap::unvisit as proposed in #610 Jan 15, 2024
src/visit/mod.rs Outdated
///
/// Return **true** if this vertex was marked as visited at the time of unsetting it, false otherwise.
fn unvisit(&mut self, _a: N) -> bool {
unimplemented!("We don't know how to mark the node as unvisited.")
Copy link
Member

Choose a reason for hiding this comment

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

Could it be avoided to have a default implementation? Instead leave this out and let it be a breaking change, that's the principled approach at least.

Copy link
Author

Choose a reason for hiding this comment

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

Yeah we could totally get by without a default implementation. My initial idea was to not make this a breaking change but an additional feature that is backwards compatible. I don't have a strong preference but if breaking change is preferable, then lets go ahead with that.

Signed-off-by: Aalekh Patel <aalekh.gwpeck.7998@icloud.com>
@bluss bluss added this to the 0.7.0 milestone Mar 6, 2024
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.

None yet

2 participants