Skip to content

Commit c0dd7a0

Browse files
srawlinsCommit Queue
authored and
Commit Queue
committed
Remove duplicate keys in dartfuzz_api_table
Duplications introduced in cfa03ed Change-Id: I9720822611aacefb9b1538d9fc59e234f96475bf Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/321842 Auto-Submit: Samuel Rawlins <[email protected]> Commit-Queue: Samuel Rawlins <[email protected]> Reviewed-by: Paul Berry <[email protected]> Reviewed-by: Ryan Macnak <[email protected]>
1 parent 7b6d9fb commit c0dd7a0

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

runtime/tools/dartfuzz/gen_api_table.dart

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -221,12 +221,11 @@ final Map<String, String> typeToLibraryMethodsListName = () {
221221
unsupportedErrorEncoding: unsupportedErrorLibs,
222222
voidEncoding: voidLibs,
223223
};
224-
var result = <String, String>{};
225-
encodings.forEach((key, value) {
226-
result[key] = value;
227-
result[key + "_NULLABLE"] = value + "Nullable";
228-
});
229-
return result;
224+
return {
225+
for (var MapEntry(:key, :value) in encodings.entries) key: value,
226+
for (var MapEntry(:key, :value) in encodings.entries)
227+
if (key != voidEncoding) '${key}_NULLABLE': '${value}Nullable',
228+
};
230229
}();
231230

232231
// Map from return type encoding to list of recognized methods with that

0 commit comments

Comments
 (0)