Skip to content
This repository has been archived by the owner on Oct 17, 2024. It is now read-only.

Drop use of pkg:collection whereNotNull() #278

Merged
merged 1 commit into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions lib/src/cancelable_operation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

import 'dart:async';

import 'package:collection/collection.dart';

/// An asynchronous operation that can be cancelled.
///
/// The value of this operation is exposed as [value]. When this operation is
Expand Down Expand Up @@ -521,7 +519,7 @@ class CancelableCompleter<T> {
final isFuture = toReturn is Future;
final cancelFutures = <Future<Object?>>[
if (isFuture) toReturn,
...?_cancelForwarders?.map(_forward).whereNotNull()
...?_cancelForwarders?.map(_forward).nonNulls
];
final results = (isFuture && cancelFutures.length == 1)
? [await toReturn]
Expand Down
4 changes: 1 addition & 3 deletions lib/src/stream_group.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

import 'dart:async';

import 'package:collection/collection.dart';

/// A collection of streams whose events are unified and sent through a central
/// stream.
///
Expand Down Expand Up @@ -239,7 +237,7 @@ class StreamGroup<T> implements Sink<Stream<T>> {
return null;
}
})
.whereNotNull()
.nonNulls
.toList();

_subscriptions.clear();
Expand Down
2 changes: 1 addition & 1 deletion lib/src/stream_queue.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import 'dart:async';
import 'dart:collection';

import 'package:collection/collection.dart';
import 'package:collection/collection.dart' show QueueList;

import 'cancelable_operation.dart';
import 'result/result.dart';
Expand Down