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

refactor: RFC: remove helpers (post-RPITIT TLC) #181

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

acl-cqc
Copy link
Contributor

@acl-cqc acl-cqc commented Jan 21, 2025

We don't really need the various helpers typed as returning NodeConnections etc. now, but removing them is a bit of a PITA because some of these structs contain each other (hence, must be parametrized) - so I haven't done all of them, thought I'd RFC first...

Note: rebased to come after #188

@acl-cqc acl-cqc changed the title refactor: simplify port_links, RFC on remove helpers (post-RPITIT TLC) refactor: simplify port_links, RFC removing helpers (post-RPITIT TLC) Jan 21, 2025
fn all_neighbours(&self, node: NodeIndex) -> impl Iterator<Item = NodeIndex> + Clone;
}
fn get_connections(
&self,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The line count would look significantly better if the old, delegate!, versions of these didn't exceed the line length limit !!

Copy link

codecov bot commented Jan 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.49%. Comparing base (c019771) to head (30f998e).

Additional details and impacted files
@@                Coverage Diff                 @@
##           acl/port_links     #181      +/-   ##
==================================================
- Coverage           83.54%   83.49%   -0.06%     
==================================================
  Files                  24       24              
  Lines                6315     6320       +5     
  Branches             6315     6320       +5     
==================================================
+ Hits                 5276     5277       +1     
- Misses                967      969       +2     
- Partials               72       74       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@acl-cqc acl-cqc changed the title refactor: simplify port_links, RFC removing helpers (post-RPITIT TLC) refactor: RFC: remove helpers (post-RPITIT TLC) Feb 24, 2025
@acl-cqc acl-cqc marked this pull request as draft February 24, 2025 18:49
@acl-cqc acl-cqc changed the base branch from main to acl/port_links February 24, 2025 18:49
Copy link

codspeed-hq bot commented Feb 24, 2025

CodSpeed Performance Report

Merging #181 will not alter performance

Comparing acl/rm_helpers (30f998e) with acl/port_links (c019771)

Summary

✅ 36 untouched benchmarks

@hugrbot
Copy link
Collaborator

hugrbot commented Feb 24, 2025

This PR contains breaking changes to the public Rust API.
Please deprecate the old API instead (if possible), or mark the PR with a ! to indicate a breaking change.

cargo-semver-checks summary

--- failure trait_requires_more_generic_type_params: trait now requires more generic type parameters ---

Description:
A trait now requires more generic type parameters than it used to. Uses of this trait that supplied the previously-required number of generic types will be broken. To fix this, consider supplying default values for newly-added generic types.
      ref: https://doc.rust-lang.org/cargo/reference/semver.html#trait-new-parameter-no-default
     impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.39.0/src/lints/trait_requires_more_generic_type_params.ron

Failed in:
trait NodeConnections (0 -> 1 required generic types) in /home/runner/work/portgraph/portgraph/PR_BRANCH/src/multiportgraph/iter.rs:276

--- failure type_requires_more_generic_type_params: type now requires more generic type parameters ---

Description:
A type now requires more generic type parameters than it used to. Uses of this type that supplied the previously-required number of generic types will be broken. To fix this, consider supplying default values for newly-added generic types.
      ref: https://doc.rust-lang.org/cargo/reference/semver.html#trait-new-parameter-no-default
     impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.39.0/src/lints/type_requires_more_generic_type_params.ron

Failed in:
Struct NodeConnections (0 -> 1 required generic types) in /home/runner/work/portgraph/portgraph/PR_BRANCH/src/multiportgraph/iter.rs:276

Base automatically changed from acl/port_links to main February 24, 2025 19:16
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