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

Use ??= over contains and ! for map defaulting #3241

Merged
merged 1 commit into from Feb 1, 2022

Commits on Jan 31, 2022

  1. Use ??= over contains and ! for map defaulting

    Avoid a non-null assertion by chaining access from a null conditional
    assignment instead of separately inserting to the map, then reading it
    back out for further operations.
    
    Also refactor an iterable `.toList()` to a List literal.
    natebosch committed Jan 31, 2022
    Copy the full SHA
    7d4241b View commit details
    Browse the repository at this point in the history