-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Apply suggestions from rust-clippy #6256
Conversation
|
Benchmark ResultsKitchen Sink ✅
Timings
Cold Bundles
Cached BundlesNo bundle changes detected. React HackerNews ✅
Timings
Cold BundlesNo bundle changes detected. Cached BundlesNo bundle changes detected. AtlasKit Editor ✅
Timings
Cold Bundles
Cached Bundles
Three.js ✅
Timings
Cold BundlesNo bundle changes detected. Cached BundlesNo bundle changes detected. |
325f312
to
cd02eed
Compare
a72bc3b
to
54188fe
Compare
54188fe
to
601c3d0
Compare
None => None, | ||
}; | ||
let handler = node.handler.map(|handler| handler.fold_with(self)); | ||
let finalizer = node.finalizer.map(|finalizer| finalizer.fold_with(self)); |
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.
TIL 😲
* v2: (69 commits) Use yarnpkg registry for all the things (#6908) Fix issue about loading configs from tsconfig.json (#6881) Add `@section` to Compressor type (#6885) Parcel API improvements (#6866) Use stream-browserify for polyfilling instead (#6863) Add support for compressor plugins (#6776) Support for inline style attributes and inline scripts in SVG (#6797) Bump less (#6852) Make sure (non-React) SVGs are in separate bundles (#6757) Add support for injecting manifest into service workers (#6798) Fix 'does not export default' error with scope hoisting and url/worklet pipeline (#6803) Remaining cargo clippy fixes (#6829) Lazily install sharp only when needed (#6816) More cargo clippy suggestions (#6811) Don't emit runtime manifest for inline child bundles (#6807) Apply suggestions from rust-clippy (#6256) Fix add directoryExists function to matchFiles call. (#6784) Upgrade to Flow 158 (#6763) Revert "added cio headers (#6404)" (#6789) Process CSS in SVGs (#6743) ...
* v2: (38 commits) Use yarnpkg registry for all the things (#6908) Fix issue about loading configs from tsconfig.json (#6881) Add `@section` to Compressor type (#6885) Parcel API improvements (#6866) Use stream-browserify for polyfilling instead (#6863) Add support for compressor plugins (#6776) Support for inline style attributes and inline scripts in SVG (#6797) Bump less (#6852) Make sure (non-React) SVGs are in separate bundles (#6757) Add support for injecting manifest into service workers (#6798) Fix 'does not export default' error with scope hoisting and url/worklet pipeline (#6803) Remaining cargo clippy fixes (#6829) Lazily install sharp only when needed (#6816) More cargo clippy suggestions (#6811) Don't emit runtime manifest for inline child bundles (#6807) Apply suggestions from rust-clippy (#6256) Fix add directoryExists function to matchFiles call. (#6784) Upgrade to Flow 158 (#6763) Revert "added cio headers (#6404)" (#6789) Process CSS in SVGs (#6743) ...
* bdo/number-edgetypes: (70 commits) Use yarnpkg registry for all the things (#6908) Fix issue about loading configs from tsconfig.json (#6881) Add `@section` to Compressor type (#6885) Parcel API improvements (#6866) Use stream-browserify for polyfilling instead (#6863) Add support for compressor plugins (#6776) Support for inline style attributes and inline scripts in SVG (#6797) Bump less (#6852) Make sure (non-React) SVGs are in separate bundles (#6757) Add support for injecting manifest into service workers (#6798) Fix 'does not export default' error with scope hoisting and url/worklet pipeline (#6803) Remaining cargo clippy fixes (#6829) Lazily install sharp only when needed (#6816) More cargo clippy suggestions (#6811) Don't emit runtime manifest for inline child bundles (#6807) Apply suggestions from rust-clippy (#6256) Fix add directoryExists function to matchFiles call. (#6784) Upgrade to Flow 158 (#6763) Revert "added cio headers (#6404)" (#6789) Process CSS in SVGs (#6743) ...
* v2: (38 commits) Use yarnpkg registry for all the things (#6908) Fix issue about loading configs from tsconfig.json (#6881) Add `@section` to Compressor type (#6885) Parcel API improvements (#6866) Use stream-browserify for polyfilling instead (#6863) Add support for compressor plugins (#6776) Support for inline style attributes and inline scripts in SVG (#6797) Bump less (#6852) Make sure (non-React) SVGs are in separate bundles (#6757) Add support for injecting manifest into service workers (#6798) Fix 'does not export default' error with scope hoisting and url/worklet pipeline (#6803) Remaining cargo clippy fixes (#6829) Lazily install sharp only when needed (#6816) More cargo clippy suggestions (#6811) Don't emit runtime manifest for inline child bundles (#6807) Apply suggestions from rust-clippy (#6256) Fix add directoryExists function to matchFiles call. (#6784) Upgrade to Flow 158 (#6763) Revert "added cio headers (#6404)" (#6789) Process CSS in SVGs (#6743) ...
* bdo/number-edgetypes: (70 commits) Use yarnpkg registry for all the things (#6908) Fix issue about loading configs from tsconfig.json (#6881) Add `@section` to Compressor type (#6885) Parcel API improvements (#6866) Use stream-browserify for polyfilling instead (#6863) Add support for compressor plugins (#6776) Support for inline style attributes and inline scripts in SVG (#6797) Bump less (#6852) Make sure (non-React) SVGs are in separate bundles (#6757) Add support for injecting manifest into service workers (#6798) Fix 'does not export default' error with scope hoisting and url/worklet pipeline (#6803) Remaining cargo clippy fixes (#6829) Lazily install sharp only when needed (#6816) More cargo clippy suggestions (#6811) Don't emit runtime manifest for inline child bundles (#6807) Apply suggestions from rust-clippy (#6256) Fix add directoryExists function to matchFiles call. (#6784) Upgrade to Flow 158 (#6763) Revert "added cio headers (#6404)" (#6789) Process CSS in SVGs (#6743) ...
* v2: (42 commits) Remove dead link to docs in diagnostic (#6913) Fix engines.parcel in SVG packager (#6911) Use imported Readable flow type instead of global (#6910) Use non-deprecated SVGO options in HTMLNanoOptimizer (#6785) Use yarnpkg registry for all the things (#6908) Fix issue about loading configs from tsconfig.json (#6881) Add `@section` to Compressor type (#6885) Parcel API improvements (#6866) Use stream-browserify for polyfilling instead (#6863) Add support for compressor plugins (#6776) Support for inline style attributes and inline scripts in SVG (#6797) Bump less (#6852) Make sure (non-React) SVGs are in separate bundles (#6757) Add support for injecting manifest into service workers (#6798) Fix 'does not export default' error with scope hoisting and url/worklet pipeline (#6803) Remaining cargo clippy fixes (#6829) Lazily install sharp only when needed (#6816) More cargo clippy suggestions (#6811) Don't emit runtime manifest for inline child bundles (#6807) Apply suggestions from rust-clippy (#6256) ...
* v2: (42 commits) Remove dead link to docs in diagnostic (#6913) Fix engines.parcel in SVG packager (#6911) Use imported Readable flow type instead of global (#6910) Use non-deprecated SVGO options in HTMLNanoOptimizer (#6785) Use yarnpkg registry for all the things (#6908) Fix issue about loading configs from tsconfig.json (#6881) Add `@section` to Compressor type (#6885) Parcel API improvements (#6866) Use stream-browserify for polyfilling instead (#6863) Add support for compressor plugins (#6776) Support for inline style attributes and inline scripts in SVG (#6797) Bump less (#6852) Make sure (non-React) SVGs are in separate bundles (#6757) Add support for injecting manifest into service workers (#6798) Fix 'does not export default' error with scope hoisting and url/worklet pipeline (#6803) Remaining cargo clippy fixes (#6829) Lazily install sharp only when needed (#6816) More cargo clippy suggestions (#6811) Don't emit runtime manifest for inline child bundles (#6807) Apply suggestions from rust-clippy (#6256) ...
* bdo/number-edgetypes: (74 commits) Remove dead link to docs in diagnostic (#6913) Fix engines.parcel in SVG packager (#6911) Use imported Readable flow type instead of global (#6910) Use non-deprecated SVGO options in HTMLNanoOptimizer (#6785) Use yarnpkg registry for all the things (#6908) Fix issue about loading configs from tsconfig.json (#6881) Add `@section` to Compressor type (#6885) Parcel API improvements (#6866) Use stream-browserify for polyfilling instead (#6863) Add support for compressor plugins (#6776) Support for inline style attributes and inline scripts in SVG (#6797) Bump less (#6852) Make sure (non-React) SVGs are in separate bundles (#6757) Add support for injecting manifest into service workers (#6798) Fix 'does not export default' error with scope hoisting and url/worklet pipeline (#6803) Remaining cargo clippy fixes (#6829) Lazily install sharp only when needed (#6816) More cargo clippy suggestions (#6811) Don't emit runtime manifest for inline child bundles (#6807) Apply suggestions from rust-clippy (#6256) ...
Fix some warnings produced by running https://github.com/rust-lang/rust-clippy
Make Github hide whitespace changes when viewing the diff
.clone()
sif let Foo(y) = x ...
instead ofmatch x { Foo(y) => ..., _ => {} }
conditionA && conditionB
return
keywordscan be
(same for match)
.map(|v| something(v))
instead ofif let Some(v) = ... { something(v)} else {None}
.is_empty()
when possible.iter().flatten()
instead offor n in list { if Some(n) = n { ...
becomes:
.or_insert(something())
should rather be.or_insert_with(|| something())
so that the function is only called when needed