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

Add Rect::is_zero_area, Size::is_zero_area #370

Merged
merged 1 commit into from
Aug 29, 2024

Conversation

waywardmonkeys
Copy link
Contributor

These replace Rect::is_empty and Size::is_empty (which are now deprecated) as the treatment of negative areas as not being empty can be slightly confusing, so using a more specific name makes things more clear.

These replace `Rect::is_empty` and `Size::is_empty` (which are now
deprecated) as the treatment of negative areas as not being empty
can be slightly confusing, so using a more specific name makes
things more clear.
Copy link
Collaborator

@derekdreery derekdreery left a comment

Choose a reason for hiding this comment

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

Yep the names are better.

Can I suggest adding is_empty as a #[doc(alias = "is_empty")] because is_empty is something a user might guess as the name (and it will disappear once the deprecated methods are removed).

@waywardmonkeys
Copy link
Contributor Author

@derekdreery Done!

@waywardmonkeys waywardmonkeys added this pull request to the merge queue Aug 29, 2024
Merged via the queue into linebender:main with commit b5bd2aa Aug 29, 2024
15 checks passed
@waywardmonkeys waywardmonkeys deleted the is_zero_area branch August 29, 2024 15:47
@DJMcNab DJMcNab mentioned this pull request Sep 2, 2024
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.

3 participants