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

add unnecessary_to_list_in_spreads #3414

Merged
merged 1 commit into from May 17, 2022

Conversation

a14n
Copy link
Contributor

@a14n a14n commented May 17, 2022

Description

Unnecessary toList() in spreads.
BAD:

children: <Widget>[
  ...['foo', 'bar', 'baz'].map((String s) => Text(s)).toList(),
]

GOOD:

children: <Widget>[
  ...['foo', 'bar', 'baz'].map((String s) => Text(s)),
]

Fixes #2965

@a14n a14n force-pushed the unnecessary_to_list_in_spreads branch from 041eeae to 8d446a7 Compare May 17, 2022 16:24
@coveralls
Copy link

coveralls commented May 17, 2022

Coverage Status

Coverage decreased (-0.005%) to 95.61% when pulling 8d446a7 on a14n:unnecessary_to_list_in_spreads into 7c714a2 on dart-lang:master.

@a14n
Copy link
Contributor Author

a14n commented May 17, 2022

@pq any idea why the CI is failing?

@pq
Copy link
Member

pq commented May 17, 2022

CI should get fixed w/ #3413.

@pq
Copy link
Member

pq commented May 17, 2022

This looks fantastic! I've kicked off fresh builds (which I hope will rebase against the fixes in #3413. If that doesn't make things green, I'll land the change and investigate.

Copy link
Member

@pq pq left a comment

Choose a reason for hiding this comment

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

💎

@pq pq merged commit d60deee into dart-lang:master May 17, 2022
@a14n a14n deleted the unnecessary_to_list_in_spreads branch May 17, 2022 18:57
mockturtl added a commit to mockturtl/tidy that referenced this pull request May 20, 2022
copybara-service bot pushed a commit to dart-lang/sdk that referenced this pull request Aug 23, 2023
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.

proposal: unnecessary_to_list_in_spreads
4 participants