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

Unified Diff: lib/messages/messages.dart

Issue 1830403002: switch package to strong mode (Closed) Base URL: git@github.com:dart-lang/code_transformers.git@master
Patch Set: Created 4 years, 9 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/messages/build_logger.dart ('k') | lib/src/async_benchmark_base.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/messages/messages.dart
diff --git a/lib/messages/messages.dart b/lib/messages/messages.dart
index 56f3c0e22315734071b69be714372996eb99e272..5268f4718304d8a4f3fb88fecc7e7338a37f85e6 100644
--- a/lib/messages/messages.dart
+++ b/lib/messages/messages.dart
@@ -184,6 +184,7 @@ class BuildLogEntry {
}
return data;
}
+
String toString() => '${toJson()}';
}
@@ -198,8 +199,9 @@ class LogEntryTable {
var res = new LogEntryTable();
for (String key in json.keys) {
var id = new MessageId.fromJson(key);
- res.entries[id] =
- json[key].map((v) => new BuildLogEntry.fromJson(v)).toList();
+ res.entries[id] = (json[key] as Iterable)
+ .map((v) => new BuildLogEntry.fromJson(v))
+ .toList();
}
return res;
}
@@ -212,11 +214,13 @@ class LogEntryTable {
});
return res;
}
+
String toString() => '${toJson()}';
void add(BuildLogEntry entry) {
entries.putIfAbsent(entry.message.id, () => []).add(entry);
}
+
void addAll(LogEntryTable other) {
for (var key in other.entries.keys) {
var values = entries.putIfAbsent(key, () => []);
« no previous file with comments | « lib/messages/build_logger.dart ('k') | lib/src/async_benchmark_base.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698