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

Model OrdF64 as NonNan #445

Open
Kixunil opened this issue Jul 11, 2022 · 4 comments
Open

Model OrdF64 as NonNan #445

Kixunil opened this issue Jul 11, 2022 · 4 comments

Comments

@Kixunil
Copy link

Kixunil commented Jul 11, 2022

It'd be better to model OrdF64 as NonNan because it brings panic (or error) closer to the cause of the issue making debugging easier. Potential inspiration: https://docs.rs/ordered-float/3.0.0/ordered_float/struct.NotNan.html

The change should be simple: make the field private and constructor panics or returns Result.

@apoelstra
Copy link
Member

concept ACK

@RCasatta
Copy link
Contributor

Indeed the fuzzer found the test case "or(0@TRIVIAL,0@TRIVIAL)" that is panicking

@Kixunil
Copy link
Author

Kixunil commented Nov 11, 2022

@RCasatta I assume that means returning Result (probably using TryFrom) is the right approach?

@RCasatta
Copy link
Contributor

Yes, I think so.

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

No branches or pull requests

3 participants