|
5 | 5 | using System; |
6 | 6 | using System.Runtime.CompilerServices; |
7 | 7 |
|
| 8 | +// ReSharper disable once CheckNamespace |
8 | 9 | namespace StructLinq |
9 | 10 | { |
10 | 11 | public static partial class StructEnumerable |
@@ -100,44 +101,44 @@ public static uint UIntCount<T, TEnumerable, TEnumerator>(this TEnumerable enume |
100 | 101 | [MethodImpl(MethodImplOptions.AggressiveInlining)] |
101 | 102 | public static int Count<T, TCollection, TEnumerator>(this TCollection collection, Func<TCollection, IStructCollection<T, TEnumerator>> _) |
102 | 103 | where TCollection : IStructCollection<T, TEnumerator> |
103 | | - where TEnumerator : struct, IStructEnumerator<T> |
| 104 | + where TEnumerator : struct, ICollectionEnumerator<T> |
104 | 105 | { |
105 | 106 | return collection.Count; |
106 | 107 | } |
107 | 108 |
|
108 | 109 | [MethodImpl(MethodImplOptions.AggressiveInlining)] |
109 | 110 | public static int Count<T, TEnumerator>(this IStructCollection<T, TEnumerator> collection) |
110 | | - where TEnumerator : struct, IStructEnumerator<T> |
| 111 | + where TEnumerator : struct, ICollectionEnumerator<T> |
111 | 112 | { |
112 | 113 | return collection.Count; |
113 | 114 | } |
114 | 115 |
|
115 | 116 | [MethodImpl(MethodImplOptions.AggressiveInlining)] |
116 | 117 | public static uint UIntCount<T, TCollection, TEnumerator>(this TCollection collection, Func<TCollection, IStructCollection<T, TEnumerator>> _) |
117 | 118 | where TCollection : IStructCollection<T, TEnumerator> |
118 | | - where TEnumerator : struct, IStructEnumerator<T> |
| 119 | + where TEnumerator : struct, ICollectionEnumerator<T> |
119 | 120 | { |
120 | 121 | return (uint)collection.Count; |
121 | 122 | } |
122 | 123 |
|
123 | 124 | [MethodImpl(MethodImplOptions.AggressiveInlining)] |
124 | 125 | public static uint UIntCount<T, TEnumerator>(this IStructCollection<T, TEnumerator> collection) |
125 | | - where TEnumerator : struct, IStructEnumerator<T> |
| 126 | + where TEnumerator : struct, ICollectionEnumerator<T> |
126 | 127 | { |
127 | 128 | return (uint)collection.Count; |
128 | 129 | } |
129 | 130 |
|
130 | 131 | [MethodImpl(MethodImplOptions.AggressiveInlining)] |
131 | 132 | public static long LongCount<T, TCollection, TEnumerator>(this TCollection collection, Func<TCollection, IStructCollection<T, TEnumerator>> _) |
132 | 133 | where TCollection : IStructCollection<T, TEnumerator> |
133 | | - where TEnumerator : struct, IStructEnumerator<T> |
| 134 | + where TEnumerator : struct, ICollectionEnumerator<T> |
134 | 135 | { |
135 | 136 | return collection.Count; |
136 | 137 | } |
137 | 138 |
|
138 | 139 | [MethodImpl(MethodImplOptions.AggressiveInlining)] |
139 | 140 | public static long LongCount<T, TEnumerator>(this IStructCollection<T, TEnumerator> collection) |
140 | | - where TEnumerator : struct, IStructEnumerator<T> |
| 141 | + where TEnumerator : struct, ICollectionEnumerator<T> |
141 | 142 | { |
142 | 143 | return collection.Count; |
143 | 144 | } |
|
0 commit comments