| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library barback.utils; | 5 library barback.utils; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:io'; | |
| 9 | 8 |
| 10 /// A pair of values. | 9 /// A pair of values. |
| 11 class Pair<E, F> { | 10 class Pair<E, F> { |
| 12 E first; | 11 E first; |
| 13 F last; | 12 F last; |
| 14 | 13 |
| 15 Pair(this.first, this.last); | 14 Pair(this.first, this.last); |
| 16 | 15 |
| 17 String toString() => '($first, $last)'; | 16 String toString() => '($first, $last)'; |
| 18 | 17 |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 stream.listen( | 188 stream.listen( |
| 190 controller.add, | 189 controller.add, |
| 191 onError: controller.addError, | 190 onError: controller.addError, |
| 192 onDone: controller.close); | 191 onDone: controller.close); |
| 193 }).catchError((e, stackTrace) { | 192 }).catchError((e, stackTrace) { |
| 194 controller.addError(e, stackTrace); | 193 controller.addError(e, stackTrace); |
| 195 controller.close(); | 194 controller.close(); |
| 196 }); | 195 }); |
| 197 return controller.stream; | 196 return controller.stream; |
| 198 } | 197 } |
| OLD | NEW |