Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(64)

Unified Diff: lib/src/asset/asset_set.dart

Issue 1947773002: Fix all strong-mode warnings. (Closed) Base URL: git@github.com:dart-lang/barback@master
Patch Set: Code review changes Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/src/asset/asset_node.dart ('k') | lib/src/asset/internal_asset.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/asset/asset_set.dart
diff --git a/lib/src/asset/asset_set.dart b/lib/src/asset/asset_set.dart
index ac58774cafd221ccc1fb31aa2712fae606164ce9..a529443701c6fa9305b3c8b83b6d783ac3273994 100644
--- a/lib/src/asset/asset_set.dart
+++ b/lib/src/asset/asset_set.dart
@@ -54,10 +54,7 @@ class AssetSet extends IterableBase<Asset> {
}
/// Returns `true` if the set contains [asset].
- bool contains(Asset asset) {
- var other = _assets[asset.id];
- return other == asset;
- }
+ bool contains(Object asset) => asset is Asset && _assets[asset.id] == asset;
/// Returns `true` if the set contains an [Asset] with [id].
bool containsId(AssetId id) {
« no previous file with comments | « lib/src/asset/asset_node.dart ('k') | lib/src/asset/internal_asset.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698