-
-
Notifications
You must be signed in to change notification settings - Fork 406
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
Remove unnecessary wraps for non built-in functions #1126
Conversation
Lint was introduced with Rust 1.50 Ignoring the lint for built-in functions because they have a fixed signature
Test262 conformance changes:
|
Codecov Report
@@ Coverage Diff @@
## master #1126 +/- ##
==========================================
- Coverage 58.53% 58.38% -0.15%
==========================================
Files 176 176
Lines 12547 12579 +32
==========================================
Hits 7344 7344
- Misses 5203 5235 +32
Continue to review full report at Codecov.
|
Benchmark for a31cc43Click to view benchmark
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
But I think it would be better if we allow clippy::unnecessary_wraps
lint in the crate scope, since we have to annotate so many builtin js functions manually.
I feel like this is a useful lint, it helps keep functions clean and we do we have a lot of functions. |
Yes. this seems like the best approach, instead of crate level :) |
Discussed in #1126 with @HaldiOdat
Discussed in #1126 with @HalidOdat
ce1c9f7
to
13cc560
Compare
Benchmark for 3b0e932Click to view benchmark
|
Looks good to me, agree with the above, I like this lint and if we really need to avoid it we should scope that down as much as possible |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! :)
Lint was introduced with Rust 1.50
Ignoring the lint for built-in functions because they have a fixed
signature
It changes the following:
Result
from return types where possible-Add
allow
clippy directives for built-in functions that since those must returnResult<Value>