prefer const constructors (#8316)

This commit is contained in:
Alexandre Ardhuin
2017-02-21 23:54:29 +01:00
committed by Adam Barth
parent 663862557b
commit e9a775bf38
43 changed files with 145 additions and 145 deletions

View File

@@ -63,7 +63,7 @@ Future<Null> main(List<String> rawArgs) async {
exitCode = 1;
print('Task result:');
print(new JsonEncoder.withIndent(' ').convert(result));
print(const JsonEncoder.withIndent(' ').convert(result));
section('Finished task "$taskName"');
}
}
@@ -115,7 +115,7 @@ final ArgParser _argParser = new ArgParser()
splitCommas: true,
callback: (List<String> value) {
if (value.isNotEmpty) {
throw new FormatException(
throw const FormatException(
'Invalid option --test. Did you mean --task (-t)?',
);
}