mirror of
https://github.com/apple/swift-async-algorithms
synced 2026-11-27 04:44:21 +00:00
Apply formatting
This commit is contained in:
1 parent
ba33a225e9
commit
d5b49aab17
97 files changed
+5078
-4440
No files matched your search
@@ -12,7 +12,10 @@
|
||||
extension AsyncSequence {
|
||||
/// Creates an asynchronous sequence that creates chunks of a given `RangeReplaceableCollection` of a given count.
|
||||
@inlinable
|
||||
public func chunks<Collected: RangeReplaceableCollection>(ofCount count: Int, into: Collected.Type) -> AsyncChunksOfCountSequence<Self, Collected> where Collected.Element == Element {
|
||||
public func chunks<Collected: RangeReplaceableCollection>(
|
||||
ofCount count: Int,
|
||||
into: Collected.Type
|
||||
) -> AsyncChunksOfCountSequence<Self, Collected> where Collected.Element == Element {
|
||||
AsyncChunksOfCountSequence(self, count: count)
|
||||
}
|
||||
|
||||
@@ -24,7 +27,8 @@ extension AsyncSequence {
|
||||
}
|
||||
|
||||
/// An `AsyncSequence` that chunks elements into `RangeReplaceableCollection` instances of at least a given count.
|
||||
public struct AsyncChunksOfCountSequence<Base: AsyncSequence, Collected: RangeReplaceableCollection>: AsyncSequence where Collected.Element == Base.Element {
|
||||
public struct AsyncChunksOfCountSequence<Base: AsyncSequence, Collected: RangeReplaceableCollection>: AsyncSequence
|
||||
where Collected.Element == Base.Element {
|
||||
public typealias Element = Collected
|
||||
|
||||
/// The iterator for a `AsyncChunksOfCountSequence` instance.
|
||||
@@ -67,10 +71,10 @@ public struct AsyncChunksOfCountSequence<Base: AsyncSequence, Collected: RangeRe
|
||||
}
|
||||
|
||||
@usableFromInline
|
||||
let base : Base
|
||||
let base: Base
|
||||
|
||||
@usableFromInline
|
||||
let count : Int
|
||||
let count: Int
|
||||
|
||||
@usableFromInline
|
||||
init(_ base: Base, count: Int) {
|
||||
@@ -85,8 +89,8 @@ public struct AsyncChunksOfCountSequence<Base: AsyncSequence, Collected: RangeRe
|
||||
}
|
||||
}
|
||||
|
||||
extension AsyncChunksOfCountSequence : Sendable where Base : Sendable, Base.Element : Sendable { }
|
||||
extension AsyncChunksOfCountSequence.Iterator : Sendable where Base.AsyncIterator : Sendable, Base.Element : Sendable { }
|
||||
extension AsyncChunksOfCountSequence: Sendable where Base: Sendable, Base.Element: Sendable {}
|
||||
extension AsyncChunksOfCountSequence.Iterator: Sendable where Base.AsyncIterator: Sendable, Base.Element: Sendable {}
|
||||
|
||||
@available(*, unavailable)
|
||||
extension AsyncChunksOfCountSequence.Iterator: Sendable { }
|
||||
extension AsyncChunksOfCountSequence.Iterator: Sendable {}
|
||||
Reference in new issue
Block a user