Index: utils/pub/utils.dart |
diff --git a/utils/pub/utils.dart b/utils/pub/utils.dart |
index 601290789e5dbbe1bdbf5cc3c257c307f5f54918..a058e48e68674063fd8980b8979ed53e6246dd55 100644 |
--- a/utils/pub/utils.dart |
+++ b/utils/pub/utils.dart |
@@ -158,7 +158,8 @@ Future defer(callback()) { |
/// Returns a [Future] that completes in [milliseconds]. |
Future sleep(int milliseconds) { |
var completer = new Completer(); |
- new Timer(new Duration(milliseconds: milliseconds), completer.complete); |
+ new Timer(new Duration(milliseconds: milliseconds), |
+ (_) => completer.complete()); |
return completer.future; |
} |
@@ -326,10 +327,10 @@ String mapToQuery(Map<String, String> map) { |
value = (value == null || value.isEmpty) ? null : encodeUriComponent(value); |
pairs.add([key, value]); |
}); |
- return Strings.join(pairs.map((pair) { |
+ return pairs.map((pair) { |
if (pair[1] == null) return pair[0]; |
return "${pair[0]}=${pair[1]}"; |
- }), "&"); |
+ }).join("&"); |
} |
/// Add all key/value pairs from [source] to [destination], overwriting any |