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

Remaining cargo clippy fixes #6829

Merged
merged 7 commits into from Aug 31, 2021
Merged

Remaining cargo clippy fixes #6829

merged 7 commits into from Aug 31, 2021

Conversation

mischnic
Copy link
Member

(You can change this setting in VSC to get inline warnings about these things in the future)

Bildschirmfoto 2021-08-30 um 22 20 46

1 "Object spreading":

    let mut esconfig = EsConfig::default();
    esconfig.jsx = config.is_jsx;
    esconfig.dynamic_import = true;
    esconfig.export_default_from = true;
    esconfig.export_namespace_from = true;
    esconfig.import_meta = true;
    Syntax::Es(esconfig)

becomes:

    Syntax::Es(EsConfig {
      jsx: config.is_jsx,
      dynamic_import: true,
      export_default_from: true,
      export_namespace_from: true,
      import_meta: true,
      ..Default::default()
    })
  1. Don't borrow (&x) when x is already the correct type
  2. .iter().flatten() instead of for n in list { if Some(n) = n { ...
  3. use if let Foo(y) = x ... instead of match x { Foo(y) => ..., _ => {} }

@height
Copy link

height bot commented Aug 30, 2021

Link Height tasks by mentioning a task ID in the pull request title or description, commit messages, or comments.

💡Tip: You can also use "Close T-X" to automatically close a task when the pull request is merged.

@mischnic mischnic changed the title Last cargo clippy update Last cargo clippy fixes Aug 30, 2021
@mischnic mischnic changed the title Last cargo clippy fixes Remaining cargo clippy fixes Aug 30, 2021
@parcel-benchmark
Copy link

Benchmark Results

Kitchen Sink ✅

Timings

Description Time Difference
Cold 1.72s +37.00ms
Cached 283.00ms +7.00ms

Cold Bundles

Bundle Size Difference Time Difference
dist/legacy/index.9c1188a7.js 1.54kb +0.00b 761.00ms -39.00ms 🚀
dist/legacy/index.17e28617.js 1.15kb +0.00b 761.00ms -39.00ms 🚀

Cached Bundles

Bundle Size Difference Time Difference
dist/legacy/parcel.7cdb0fad.webp 102.94kb +0.00b 488.00ms -62.00ms 🚀
dist/legacy/parcel.7cdb0fad.webp 102.94kb +0.00b 488.00ms -63.00ms 🚀
dist/modern/parcel.7cdb0fad.webp 102.94kb +0.00b 488.00ms -63.00ms 🚀
dist/legacy/index.html 775.00b +0.00b 837.00ms -146.00ms 🚀
dist/modern/index.html 715.00b +0.00b 837.00ms -145.00ms 🚀
dist/legacy/index.5ba75694.css 77.00b +0.00b 953.00ms -52.00ms 🚀
dist/modern/index.14235cd8.css 77.00b +0.00b 953.00ms -51.00ms 🚀

React HackerNews ✅

Timings

Description Time Difference
Cold 9.14s +97.00ms
Cached 459.00ms +17.00ms

Cold Bundles

No bundle changes detected.

Cached Bundles

Bundle Size Difference Time Difference
dist/logo.c5bb83f1.png 246.00b +0.00b 4.29s -531.00ms 🚀

AtlasKit Editor ✅

Timings

Description Time Difference
Cold 60.00s -113.00ms
Cached 1.55s -45.00ms

Cold Bundles

Bundle Size Difference Time Difference
dist/index.89fd9fe9.js 1.77mb +2.00b ⚠️ 17.24s -161.00ms
dist/editorView.4b725dd4.js 594.90kb +0.00b 33.88s -11.69s 🚀
dist/popup.64a312fa.js 209.65kb +0.00b 33.87s -11.69s 🚀
dist/Toolbar.1415bca9.js 107.22kb +0.00b 33.88s -11.69s 🚀
dist/Modal.66db8f37.js 45.31kb +0.00b 33.89s -11.68s 🚀
dist/js.0f0bb621.js 17.24kb +0.00b 33.88s -11.69s 🚀
dist/ui.58ef0e53.js 14.93kb +0.00b 33.89s -11.68s 🚀
dist/smartMediaEditor.af8354ff.js 13.24kb +0.00b 33.88s -11.69s 🚀
dist/dropzone.0d183115.js 12.13kb +0.00b 33.88s -11.68s 🚀
dist/EmojiPickerComponent.55e0a64c.js 3.71kb +0.00b 33.89s -11.68s 🚀
dist/png-chunks-extract.94b5b9fc.js 3.56kb +0.00b 33.88s -11.69s 🚀
dist/dropzone.cf53fd41.js 3.28kb +0.00b 33.87s -11.69s 🚀
dist/clipboard.f917539f.js 2.92kb +0.00b 33.88s -11.68s 🚀
dist/ResourcedEmojiComponent.78f6ddfc.js 2.10kb +0.00b 33.89s -11.68s 🚀
dist/browser.17513657.js 1.68kb +0.00b 33.88s -11.69s 🚀
dist/media-card-analytics-error-boundary.75fac461.js 1.10kb +0.00b 33.88s -11.69s 🚀
dist/media-picker-analytics-error-boundary.cfe02cc6.js 949.00b +0.00b 33.87s -11.69s 🚀
dist/simpleHasher.2a6e12b6.js 626.00b +0.00b 33.89s -11.67s 🚀

Cached Bundles

Bundle Size Difference Time Difference
dist/index.e05f8a65.js 1.77mb -4.00b 🚀 17.20s -102.00ms
dist/EmojiPickerComponent.165bedc1.js 146.66kb +0.00b 18.67s -9.89s 🚀
dist/esm.0745b1d3.js 33.13kb +0.00b 18.67s -9.89s 🚀
dist/DatePicker.05474f95.js 22.96kb +0.00b 18.67s -9.89s 🚀
dist/js.0f0bb621.js 17.24kb +0.00b 34.34s -11.33s 🚀
dist/png-chunks-extract.94b5b9fc.js 3.56kb +0.00b 34.34s -11.34s 🚀
dist/feedback.e18b45f0.js 1.75kb +0.00b 18.67s -9.89s 🚀
dist/workerHasher.567cfc57.js 1.62kb +0.00b 18.67s -9.89s 🚀
dist/heading6.b3b946d1.js 1.49kb +0.00b 18.67s -9.89s 🚀
dist/heading5.e617db66.js 1.37kb +0.00b 18.67s -9.89s 🚀
dist/expand.1f17de7f.js 1.27kb +0.00b 18.67s -9.89s 🚀

Three.js ✅

Timings

Description Time Difference
Cold 6.42s -71.00ms
Cached 350.00ms +10.00ms

Cold Bundles

No bundle changes detected.

Cached Bundles

No bundle changes detected.

Click here to view a detailed benchmark overview.

@@ -32,7 +32,7 @@ pub enum DependencyKind {
WebWorker,
ServiceWorker,
Worklet,
URL,
Url,
Copy link
Member

Choose a reason for hiding this comment

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

😢

let options = Options {
deflate: Deflaters::Libdeflater,
strip: Headers::Safe,
..Default::default()
Copy link
Member

Choose a reason for hiding this comment

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

Still weirded out that this is at the end in rust but at the top in js

@mischnic mischnic merged commit f03eddd into v2 Aug 31, 2021
@mischnic mischnic deleted the cargo-clippy-3 branch August 31, 2021 09:16
lettertwo added a commit that referenced this pull request Sep 10, 2021
* 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)
  ...
lettertwo added a commit that referenced this pull request Sep 10, 2021
* 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)
  ...
lettertwo added a commit that referenced this pull request Sep 11, 2021
* 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)
  ...
lettertwo added a commit that referenced this pull request Sep 13, 2021
* 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)
  ...
lettertwo added a commit that referenced this pull request Sep 13, 2021
* 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)
  ...
lettertwo added a commit that referenced this pull request Sep 13, 2021
* 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)
  ...
lettertwo added a commit that referenced this pull request Sep 13, 2021
* 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)
  ...
lettertwo added a commit that referenced this pull request Sep 13, 2021
* 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)
  ...
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.

None yet

3 participants