| Index: utils/pub/utils.dart
|
| diff --git a/utils/pub/utils.dart b/utils/pub/utils.dart
|
| index 544a3ce0bef5c1c9a9d99dc98154aa04694a91d3..9094984adcf3d37cd926fc35546b61e243c9a735 100644
|
| --- a/utils/pub/utils.dart
|
| +++ b/utils/pub/utils.dart
|
| @@ -104,13 +104,16 @@ bool endsWithPattern(String str, Pattern matcher) {
|
| }
|
|
|
| /// Returns the hex-encoded sha1 hash of [source].
|
| -String sha1(String source) =>
|
| - CryptoUtils.bytesToHex(new SHA1().add(source.charCodes).close());
|
| +String sha1(String source) {
|
| + var sha = new SHA1();
|
| + sha.add(source.charCodes);
|
| + return CryptoUtils.bytesToHex(sha.close());
|
| +}
|
|
|
| /// Returns a [Future] that completes in [milliseconds].
|
| Future sleep(int milliseconds) {
|
| var completer = new Completer();
|
| - new Timer(milliseconds, completer.complete);
|
| + new Timer(milliseconds, (_) => completer.complete());
|
| return completer.future;
|
| }
|
|
|
|
|