Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upMake handle_potential_webgl_error more ergonomic #7358
Closed
Labels
Comments
|
I take this :). |
|
Great! |
|
@jdm When you pass None as the third argument do you not mean it's () ? |
|
No, None is used for methods that return |
bors-servo
pushed a commit
that referenced
this issue
Aug 26, 2015
Make handle_potential_webgl_error more ergonomic #7358 <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7360) <!-- Reviewable:end -->
jrmuizel
pushed a commit
to jrmuizel/gecko-cinnabar
that referenced
this issue
Jun 12, 2017
… (from wilcus:ErgonomicSignature); r=Ms2ger servo/servo#7358 Source-Repo: https://github.com/servo/servo Source-Revision: 06ba2167ba3a247c1e7473a208ee4e692f6fa30e
gecko-dev-updater
pushed a commit
to marco-c/gecko-dev-comments-removed
that referenced
this issue
Sep 30, 2019
… (from wilcus:ErgonomicSignature); r=Ms2ger servo/servo#7358 Source-Repo: https://github.com/servo/servo Source-Revision: 06ba2167ba3a247c1e7473a208ee4e692f6fa30e UltraBlame original commit: c642331bfee978a4293a714f752e789e86303af6
gecko-dev-updater
pushed a commit
to marco-c/gecko-dev-wordified
that referenced
this issue
Oct 1, 2019
… (from wilcus:ErgonomicSignature); r=Ms2ger servo/servo#7358 Source-Repo: https://github.com/servo/servo Source-Revision: 06ba2167ba3a247c1e7473a208ee4e692f6fa30e UltraBlame original commit: c642331bfee978a4293a714f752e789e86303af6
gecko-dev-updater
pushed a commit
to marco-c/gecko-dev-wordified-and-comments-removed
that referenced
this issue
Oct 1, 2019
… (from wilcus:ErgonomicSignature); r=Ms2ger servo/servo#7358 Source-Repo: https://github.com/servo/servo Source-Revision: 06ba2167ba3a247c1e7473a208ee4e692f6fa30e UltraBlame original commit: c642331bfee978a4293a714f752e789e86303af6
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We have a macro called
handle_potential_webgl_errorwhich takes a return value as the third argument. In the case where a caller has a void return type, we use it likehandle_potential_webgl_error(a, b, ())which I find ugly. We can extend the macro to have a second variant that only takes two arguments and passes the()argument internally, like http://mxr.mozilla.org/servo/source/components/script/dom/macros.rs#6 .Code: components/script/dom/webglrenderingcontext.rs