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

Problem with Bound's PartialOrd implementation #5

Closed
rsnively opened this issue Dec 22, 2021 · 1 comment
Closed

Problem with Bound's PartialOrd implementation #5

rsnively opened this issue Dec 22, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@rsnively
Copy link
Owner

Comparing bounds can have different interpretations if we're talking about lower bounds or upper bounds.

For example if

let a = Bound::Excluded(4);
let b = Bound::Included(4);

When we're talking about upper bounds, a < b but if we're talking about lower bounds, a > b

Splitting up Bound into UpperBound and LowerBound might solve the problem. Could also consider getting rid of the implementation and dealing with the fallout.

@rsnively
Copy link
Owner Author

Fixed in 0.1.1

The implementation was removed from Bound and added to the new LowerBound and UpperBound structs.

@rsnively rsnively reopened this Dec 28, 2021
@rsnively rsnively added the bug Something isn't working label Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant