Skip to content

Commit d9b0e8b

Browse files
committed
+ make toSet only implementational detail
1 parent 3d3618c commit d9b0e8b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/netglade_utils/lib/src/extensions/iterable_extensions.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ import 'package:collection/collection.dart';
55
typedef Selector<T, K> = K Function(T selectFrom);
66

77
extension IterableExtensions<T> on Iterable<T> {
8-
Set<T> distinct() {
8+
Iterable<T> distinct() {
99
return toSet();
1010
}
1111

12-
/// Returns an iterable containing only elements from the given collection having distinct keys returned by the given [selector] function.
12+
/// Returns an iterable containing only elements from the given collection having distinct keys returned by the given [selector] function.
1313
/// If multiple elements have the same key, first element is returned.
1414
Iterable<T> distinctBy<K>(Selector<T, K> selector) {
1515
return groupBy<T, K>(this, selector)

0 commit comments

Comments
 (0)