Remove unnecessary null checks in dev/devicelab (#118842)
This commit is contained in:
committed by
GitHub
parent
f291eb3495
commit
ab3c82244e
@@ -2042,10 +2042,7 @@ class _UnzipListEntry {
|
||||
required this.uncompressedSize,
|
||||
required this.compressedSize,
|
||||
required this.path,
|
||||
}) : assert(uncompressedSize != null),
|
||||
assert(compressedSize != null),
|
||||
assert(compressedSize <= uncompressedSize),
|
||||
assert(path != null);
|
||||
}) : assert(compressedSize <= uncompressedSize);
|
||||
|
||||
final int uncompressedSize;
|
||||
final int compressedSize;
|
||||
|
||||
@@ -161,11 +161,11 @@ Future<TaskResult> runWebBenchmark({ required bool useCanvasKit }) async {
|
||||
|
||||
final String namespace = '$benchmarkName.$backend';
|
||||
final List<String> scoreKeys = List<String>.from(profile['scoreKeys'] as List<dynamic>);
|
||||
if (scoreKeys == null || scoreKeys.isEmpty) {
|
||||
if (scoreKeys.isEmpty) {
|
||||
throw 'No score keys in benchmark "$benchmarkName"';
|
||||
}
|
||||
for (final String scoreKey in scoreKeys) {
|
||||
if (scoreKey == null || scoreKey.isEmpty) {
|
||||
if (scoreKey.isEmpty) {
|
||||
throw 'Score key is empty in benchmark "$benchmarkName". '
|
||||
'Received [${scoreKeys.join(', ')}]';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user