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

changed number input's bounds to an inclusive range #242

Merged
merged 7 commits into from
May 17, 2024
Merged

changed number input's bounds to an inclusive range #242

merged 7 commits into from
May 17, 2024

Conversation

Redhawk18
Copy link
Contributor

No description provided.

@Redhawk18 Redhawk18 marked this pull request as draft May 14, 2024 06:16
@Redhawk18
Copy link
Contributor Author

I was thinking about it and theres a lot of small changes I want aswell

Copy link
Collaborator

@genusistimelord genusistimelord left a comment

Choose a reason for hiding this comment

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

I would like you to change this to use RangeBounds So it can use any of the Range types like
..
0..
0..100
..100
0..=100

I would also like you to add an additional trait requirement. https://docs.rs/num-traits/latest/num_traits/bounds/trait.Bounded.html

This will allow use to get a min and a max for all the Generics. Which for the .. style bounds we can then set the minimal and maximum numbers to the Unbounded.

Copy link
Collaborator

@genusistimelord genusistimelord left a comment

Choose a reason for hiding this comment

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

This looks much better. Thank you.

@Redhawk18 Redhawk18 marked this pull request as ready for review May 16, 2024 22:10
@Redhawk18
Copy link
Contributor Author

@genusistimelord

Copy link
Collaborator

@genusistimelord genusistimelord left a comment

Choose a reason for hiding this comment

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

approved

@genusistimelord genusistimelord merged commit 8cc9128 into iced-rs:main May 17, 2024
2 checks passed
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