Skip to content

Conversation

@aalekhpatel07
Copy link
Contributor

@aalekhpatel07 aalekhpatel07 commented Jan 15, 2024

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

BREAKING CHANGE:

Add new method to existing trait.

@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
Contributor 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.

@bluss bluss added this to the 0.7.0 milestone Mar 6, 2024
@starovoid starovoid mentioned this pull request Mar 21, 2025
8 tasks
Signed-off-by: Aalekh Patel <aalekh.gwpeck.7998@icloud.com>
Signed-off-by: Aalekh Patel <aalekh.gwpeck.7998@icloud.com>
Signed-off-by: Aalekh Patel <aalekh.gwpeck.7998@icloud.com>
@github-actions
Copy link
Contributor

github-actions bot commented Mar 21, 2025

This PR contains breaking changes to the public Rust API.

cargo-semver-checks summary

--- failure trait_method_added: pub trait method added ---

Description:
A non-sealed public trait added a new method without a default implementation, which breaks downstream implementations of the trait
      ref: https://doc.rust-lang.org/cargo/reference/semver.html#trait-new-item-no-default
     impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.40.0/src/lints/trait_method_added.ron

Failed in:
trait method petgraph::visit::VisitMap::unvisit in file /home/runner/work/petgraph/petgraph/PR_BRANCH/src/visit/mod.rs:407

@starovoid starovoid changed the title Add VisitMap::unvisit as proposed in #610 feat!: Add VisitMap::unvisit as proposed in #610 Mar 21, 2025
@starovoid starovoid self-requested a review March 21, 2025 20:04
@starovoid starovoid added this pull request to the merge queue Mar 22, 2025
Merged via the queue into petgraph:master with commit bf61c6f Mar 22, 2025
10 checks passed
github-merge-queue bot pushed a commit that referenced this pull request Apr 5, 2025
A sufficient number of proposed changes have accumulated to combine them
and publish a new major release numbered `0.8.0`.


BREAKING CHANGE:

This will require the user to provide extra type parameter in some APIs
(Read more in #747).

## List of changes
- [x] #747
The main innovation of the current release, the long-awaited feature
that has become very relevant due to the transition of dependent
projects to support `no_std`.
- [x] #662 
- [x] #611
- [x] #728
- [x] #686
- [x] #737 
- [x] #720 
- [x] #718 

## Note
There are still a large number of PRs that we want to adopt in the near
future, so we should expect at least a release of `0.8.1` soon after the
completion of `0.8.0`.

Thank you all for participating!

---------

Co-authored-by: Agustin Borgna <agustinborgna@gmail.com>
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.

4 participants