Skip to content

Conversation

@starovoid
Copy link
Collaborator

This fixes #763 .

@starovoid starovoid changed the title Bring back VisitMap impl for std HashSet fix: Bring back VisitMap impl for std HashSet Apr 7, 2025
Copy link
Contributor

@bushrat011899 bushrat011899 left a comment

Choose a reason for hiding this comment

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

This is a good fix, but I'm not sure why this is considered a semver break.

}

#[cfg(feature = "std")]
impl<N, S> VisitMap<N> for std::collections::HashSet<N, S>
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't really understand how this is considered a semver break, but I guess it is?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is most likely due to the cargo-semver-checks bug obi1kenobi/cargo-semver-checks#1200

Copy link
Member

@ABorgna ABorgna Apr 7, 2025

Choose a reason for hiding this comment

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

Fixed now with #765.

For reference to the links pointing here, here's the error we had:

--- failure trait_newly_sealed: pub trait became sealed ---

Description:
A publicly-visible trait became sealed, so downstream crates are no longer able to implement it
        ref: https://rust-lang.github.io/api-guidelines/future-proofing.html#sealed-traits-protect-against-downstream-implementations-c-sealed
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.40.0/src/lints/trait_newly_sealed.ron

Failed in:
  trait petgraph::data::Create in file /home/runner/work/petgraph/petgraph/PR_BRANCH/src/data.rs:76
  trait petgraph::data::FromElements in file /home/runner/work/petgraph/petgraph/PR_BRANCH/src/data.rs:281
  trait petgraph::data::Build in file /home/runner/work/petgraph/petgraph/PR_BRANCH/src/data.rs:[53](https://github.com/petgraph/petgraph/actions/runs/14302765504/job/40080013218?pr=764#step:9:54)

https://github.com/petgraph/petgraph/actions/runs/14302765504/job/40080013218#step:9:52

github-merge-queue bot pushed a commit that referenced this pull request Apr 7, 2025
Disables a failing semver-checks that's causing [false
positives](#764 (comment)).

This seems to be caused by
obi1kenobi/cargo-semver-checks#1200
@ABorgna ABorgna added this pull request to the merge queue Apr 7, 2025
Merged via the queue into master with commit 8ca4ab2 Apr 7, 2025
10 checks passed
@ABorgna ABorgna deleted the visitmap-std branch April 7, 2025 09:21
@github-actions github-actions bot mentioned this pull request Apr 7, 2025
github-merge-queue bot pushed a commit that referenced this pull request Apr 7, 2025
## 🤖 New release

* `petgraph`: 0.8.0 -> 0.8.1 (✓ API compatible changes)

<details><summary><i><b>Changelog</b></i></summary><p>

<blockquote>

##
[0.8.1](https://github.com/petgraph/petgraph/compare/petgraph@v0.8.0...petgraph@v0.8.1)
- 2025-04-07

### Bug Fixes

- Bring back `VisitMap` impl for std `HashSet`
([#764](#764))

### New Features

- Add `UnionFind` capacity management methods
([#736](#736))
- add `#[track_caller]` to functions that panic
([#748](#748))
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/release-plz/release-plz/).

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Agustín 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.

v0.8.0 impl VisitMap for HashSet breaking change

4 participants