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 Size::is_empty_or_negative. #248

Merged
merged 1 commit into from Dec 8, 2017
Merged

Add Size::is_empty_or_negative. #248

merged 1 commit into from Dec 8, 2017

Conversation

@nical
Copy link
Collaborator

nical commented Dec 8, 2017

There are a places in webrender where we go through the boilerplate of checking width and height separately, it'd be more convenient to have something handy.

I'm tempted to call it is_empty since in practice negative sizes tend to be treated as empty in webrender.


This change is Reviewable

@nical
Copy link
Collaborator Author

nical commented Dec 8, 2017

r? @kvark

@kvark
Copy link
Member

kvark commented Dec 8, 2017

@bors-servo
Copy link
Contributor

bors-servo commented Dec 8, 2017

📌 Commit 8156545 has been approved by kvark

@bors-servo
Copy link
Contributor

bors-servo commented Dec 8, 2017

Testing commit 8156545 with merge ab8ac13...

bors-servo added a commit that referenced this pull request Dec 8, 2017
Add Size::is_empty_or_negative.

There are a places in webrender where we go through the boilerplate of checking width and height separately, it'd be more convenient to have something handy.

I'm tempted to call it `is_empty` since in practice negative sizes tend to be treated as empty in webrender.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/euclid/248)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Dec 8, 2017

☀️ Test successful - status-travis
Approved by: kvark
Pushing ab8ac13 to master...

@bors-servo bors-servo merged commit 8156545 into servo:master Dec 8, 2017
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.