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

Remove an unnecessary dynamic #2239

Merged
merged 4 commits into from
Jun 4, 2024
Merged

Remove an unnecessary dynamic #2239

merged 4 commits into from
Jun 4, 2024

Conversation

natebosch
Copy link
Member

@natebosch natebosch commented Jun 4, 2024

The dynamic was used to satisfy the purpose that is more directly
expressed with FutureOr.

Replace the private _Command class with a typedef record with named fields.

The `dynamic` was used to satisfy the purpose that is more directly
expressed with `FutureOr`.
@natebosch natebosch requested a review from kevmoo June 4, 2024 00:26
Copy link
Member

@kevmoo kevmoo left a comment

Choose a reason for hiding this comment

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

needs a rebase, but yes!

@natebosch natebosch requested a review from jakemac53 June 4, 2024 19:23
@natebosch
Copy link
Member Author

I expanded the scope a bit from the original review. @jakemac53 WDYT?


_Command(this.name, this.description, this.body);
}
typedef _Command = ({
Copy link
Member

Choose a reason for hiding this comment

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

That works, too!

@natebosch natebosch merged commit 6035380 into master Jun 4, 2024
37 checks passed
@natebosch natebosch deleted the future-or-over-dynamic branch June 4, 2024 23:32
copybara-service bot pushed a commit to dart-lang/sdk that referenced this pull request Jun 6, 2024
…annel, webdev, yaml_edit

Revisions updated by `dart tools/rev_sdk_deps.dart`.

crypto (https://github.com/dart-lang/crypto/compare/0a10171..7a9428a):
  7a9428a  2024-06-04  Kevin Moore  Bump lints dep (dart-archive/crypto#172)

dartdoc (https://github.com/dart-lang/dartdoc/compare/45627f9..ddb8fb4):
  ddb8fb44  2024-06-03  Konstantin Scheglov  Use package:analyzer/source/source.dart (dart-lang/dartdoc#3780)

http (https://github.com/dart-lang/http/compare/7bfbeea..a3567f8):
  a3567f8  2024-06-05  Brian Quinlan  Prepare to release cronet_http 1.3.1 (dart-lang/http#1228)
  7addc61  2024-06-05  Hossein Yousefi  [cronet_http] Upgrade jnigen to 0.9.2 to close `#1213` (dart-lang/http#1225)
  eb87a60  2024-06-04  Anikate De  pkgs/ok_http: Close the client (override `close()` from `BaseClient`) (dart-lang/http#1224)
  9f022d2  2024-06-04  Anikate De  pkgs/http_client_conformance_tests: add boolean flag `supportsFoldedHeaders` (dart-lang/http#1222)
  90837df  2024-06-03  Anikate De  pkgs/ok_http: Condense JNI Bindings to `single_file` structure, and add missing server errors test (dart-lang/http#1221)

logging (https://github.com/dart-lang/logging/compare/73f043a..dbd6829):
  dbd6829  2024-06-04  Sarah Zakarias  Update `topics` in `pubspec.yaml` (dart-archive/logging#165)

test (https://github.com/dart-lang/test/compare/2464ad5..83c597e):
  83c597e5  2024-06-05  Jacob MacDonald  enable asserts in dart2wasm tests (dart-lang/test#2241)
  60353804  2024-06-04  Nate Bosch  Remove an unnecessary `dynamic` (dart-lang/test#2239)
  43ad4cd8  2024-06-03  Kevin Moore  random cleanup (dart-lang/test#2232)
  18db77c3  2024-06-02  Kevin Moore  prepare to publish test_api (dart-lang/test#2238)
  cd72e8d8  2024-06-02  Kevin Moore  Prepare to publish (dart-lang/test#2237)
  9c6adaa7  2024-06-01  Kevin Moore  fixes (dart-lang/test#2235)
  0110a80b  2024-06-01  dependabot[bot]  Bump the github-actions group with 2 updates (dart-lang/test#2236)
  b1b2c029  2024-06-01  Martin Kustermann  Fix `dart run test -p chrome -c dart2wasm` (dart-lang/test#2233)

tools (https://github.com/dart-lang/tools/compare/86b3661..4321aec):
  4321aec  2024-06-05  Andrew Kolos  [unified_analytics] Suppress any `FileSystemException` thrown during `Analytics.send` (dart-lang/tools#274)
  e5d4c8b  2024-06-03  dependabot[bot]  Bump actions/checkout from 4.1.5 to 4.1.6 in the github-actions group (dart-lang/tools#271)

web_socket_channel (https://github.com/dart-lang/web_socket_channel/compare/45b8ce9..bf69990):
  bf69990  2024-06-03  Thibault Chatillon  bump web_socket dependency 0.1.3 -> 0.1.5 (dart-lang/web_socket_channel#370)
  5b428dd  2024-06-02  dependabot[bot]  Bump actions/checkout from 4.1.5 to 4.1.6 in the github-actions group (dart-lang/web_socket_channel#371)
  afd1e3c  2024-05-23  Brian Quinlan  Remove `--fatal-infos` from `dart pub downgrade` analysis (dart-lang/web_socket_channel#367)
  cb20b71  2024-05-23  Sarah Zakarias  Add `topics` to `pubspec.yaml` (dart-lang/web_socket_channel#362)
  8514229  2024-05-22  Kevin Moore  Bump and fix lints (dart-lang/web_socket_channel#366)

webdev (https://github.com/dart-lang/webdev/compare/a97c2a1..9ada46f):
  9ada46fc  2024-06-05  Nicholas Shahan  Hide more temporary variables when debugging (dart-lang/webdev#2445)

yaml_edit (https://github.com/dart-lang/yaml_edit/compare/963e7a3..08a146e):
  08a146e  2024-06-06  Kavisi  Fix splice list insertion (dart-lang/yaml_edit#84)
  561309e  2024-06-01  dependabot[bot]  Bump actions/checkout from 4.1.5 to 4.1.6 in the github-actions group (dart-lang/yaml_edit#85)
  b582fd5  2024-05-31  Kavisi  Fix error thrown when inserting keys (dart-lang/yaml_edit#80)

Change-Id: I36acbc26fe97d8a1e3fdfa5f4855cc4be7d84dd7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/370080
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
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.

3 participants