| Index: packages/which/lib/src/util.dart
|
| diff --git a/packages/which/lib/src/util.dart b/packages/which/lib/src/util.dart
|
| deleted file mode 100755
|
| index 41af1393d2a827c7dab6edcab17c15fabdf92636..0000000000000000000000000000000000000000
|
| --- a/packages/which/lib/src/util.dart
|
| +++ /dev/null
|
| @@ -1,18 +0,0 @@
|
| -
|
| -library which.src.util;
|
| -
|
| -import 'dart:async';
|
| -
|
| -/// Transparently call `firstWhere` on a [Stream] or [Iterable].
|
| -// TODO: Remove once https://dartbug.com/ is fixed.
|
| -firstWhere(sequence, test, { orElse() }) => sequence is Iterable ?
|
| - sequence.firstWhere(test, orElse: orElse) :
|
| - _streamFirstWhere(sequence, test, orElse: orElse);
|
| -
|
| -Future _streamFirstWhere(Stream stream, test(item), { orElse() }) {
|
| - var pairs = stream.asyncMap((item) => test(item).then((result) => [item, result]));
|
| - return pairs.firstWhere((pair) => pair.last, defaultValue: () => [orElse(), null]).then((pair) => pair.first);
|
| -}
|
| -
|
| -/// The identity function simply returns its argument ([x]).
|
| -identity(x) => x;
|
|
|