marcglasberg / fast_immutable_collections

Dart Package: Immutable lists, sets, maps, and multimaps, which are as fast as their native mutable counterparts. Extension methods and comparators for native Dart collections.
BSD 2-Clause "Simplified" License
213 stars 30 forks source link

Minor improvement to codebase #40

Closed fzyzcjy closed 2 years ago

marcglasberg commented 2 years ago

I don't think that's the same result.

If _iMap is not null, but _iMap![key] returns null, this returns null:

_iMap != null ? _iMap![key] : _map![key];

But here, if _iMap is not null, but _iMap![key] returns null, this returns _map![key]:

_iMap?[key] ?? _map![key];
fzyzcjy commented 2 years ago

You are right!