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

Make helpers.-> use edge.-> #5

Merged
merged 1 commit into from
Sep 30, 2023
Merged

Make helpers.-> use edge.-> #5

merged 1 commit into from
Sep 30, 2023

Commits on Sep 29, 2023

  1. Make helpers.-> use edge.->

    The original `->` in `edge` sorts the parameters before forming the edge, but helpers.`->` doesn't do this.
    
    helpers.`->` also has a more precise signature (on `tuple[x, y: float]` rather than the `Point` concept), which means generic procs can prefer it if `->` is considered to be overloaded.
    
    This has not been an issue in this package because the generic procs that use `->` only have access to 1 overload of it and so Nim considers them not overloaded. However this behavior is not reliable: nim-lang/Nim#11184, and so attempts to fix this cause issues in this library's tests.
    
    Alternatively the tests can use another operator to form unsorted edges, or the signature of helpers.`->` can be made equally as precise as the one in `edge` (i.e. defined on `Point`).
    metagn authored Sep 29, 2023
    Configuration menu
    Copy the full SHA
    c5e3931 View commit details
    Browse the repository at this point in the history