mirror of
https://github.com/apple/swift-async-algorithms
synced 2026-11-27 04:44:21 +00:00
Fixing a few typos (#115)
This PR fixes a few typos across various comments in the code.
This commit is contained in:
1 parent
f9369af30c
commit
0dfb244b1b
9 files changed
+11
-11
No files matched your search
@@ -203,7 +203,7 @@ extension AsyncSequence where Element: Sendable {
|
||||
///
|
||||
/// Use the `buffer(_:)` method to account for `AsyncSequence` types that may produce elements faster
|
||||
/// than they are iterated. The `createBuffer` closure returns a backing buffer for storing elements and dealing with
|
||||
/// behavioral charcteristics of the `buffer(_:)` algorithm.
|
||||
/// behavioral characteristics of the `buffer(_:)` algorithm.
|
||||
///
|
||||
/// - Parameter createBuffer: A closure that constructs a new `AsyncBuffer` actor to store buffered values.
|
||||
/// - Returns: An asynchronous sequence that buffers elements using the specified `AsyncBuffer`.
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
/// - Parameters:
|
||||
/// - s1: The first asynchronous sequence.
|
||||
/// - s2: The second asynchronous sequence.
|
||||
/// - Returns: An asynchonous sequence that iterates first over the elements of `s1`, and
|
||||
/// - Returns: An asynchronous sequence that iterates first over the elements of `s1`, and
|
||||
/// then over the elements of `s2`.
|
||||
@inlinable
|
||||
public func chain<Base1: AsyncSequence, Base2: AsyncSequence>(_ s1: Base1, _ s2: Base2) -> AsyncChain2Sequence<Base1, Base2> where Base1.Element == Base2.Element {
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
/// - s1: The first asynchronous sequence.
|
||||
/// - s2: The second asynchronous sequence.
|
||||
/// - s3: The third asynchronous sequence.
|
||||
/// - Returns: An asynchonous sequence that iterates first over the elements of `s1`, and
|
||||
/// - Returns: An asynchronous sequence that iterates first over the elements of `s1`, and
|
||||
/// then over the elements of `s2`, and then over the elements of `s3`
|
||||
@inlinable
|
||||
public func chain<Base1: AsyncSequence, Base2: AsyncSequence, Base3: AsyncSequence>(_ s1: Base1, _ s2: Base2, _ s3: Base3) -> AsyncChain3Sequence<Base1, Base2, Base3> {
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
extension AsyncSequence {
|
||||
/// Creates an asynchronous sequence that emits the latest element after a given quiescence period
|
||||
/// has elapsed by using a spectified Clock.
|
||||
/// has elapsed by using a specified Clock.
|
||||
@available(macOS 9999, iOS 9999, tvOS 9999, watchOS 9999, *)
|
||||
public func debounce<C: Clock>(for interval: C.Instant.Duration, tolerance: C.Instant.Duration? = nil, clock: C) -> AsyncDebounceSequence<Self, C> {
|
||||
AsyncDebounceSequence(self, interval: interval, tolerance: tolerance, clock: clock)
|
||||
|
||||
@@ -22,10 +22,10 @@ extension Sequence {
|
||||
/// An asynchronous sequence composed from a synchronous sequence.
|
||||
///
|
||||
/// Asynchronous lazy sequences can be used to interface existing or pre-calculated
|
||||
/// data to interoperate with other asynchronous sequences and algoritms based on
|
||||
/// data to interoperate with other asynchronous sequences and algorithms based on
|
||||
/// asynchronous sequences.
|
||||
///
|
||||
/// This functions similarly to `LazySequence` by accessing elemetns sequentially
|
||||
/// This functions similarly to `LazySequence` by accessing elements sequentially
|
||||
/// in the iterator's `next()` method.
|
||||
@frozen
|
||||
public struct AsyncLazySequence<Base: Sequence>: AsyncSequence {
|
||||
|
||||
@@ -174,7 +174,7 @@ extension Merge2StateMachine.Either where Base1.Element == Base2.Element {
|
||||
/// An asynchronous sequence of elements from two underlying asynchronous sequences
|
||||
///
|
||||
/// In a `AsyncMerge2Sequence` instance, the *i*th element is the *i*th element
|
||||
/// resolved in sequential order out of the two underyling asynchronous sequences.
|
||||
/// resolved in sequential order out of the two underlying asynchronous sequences.
|
||||
/// Use the `merge(_:_:)` function to create an `AsyncMerge2Sequence`.
|
||||
public struct AsyncMerge2Sequence<Base1: AsyncSequence, Base2: AsyncSequence>: AsyncSequence, Sendable
|
||||
where
|
||||
|
||||
@@ -23,7 +23,7 @@ where
|
||||
/// An asynchronous sequence of elements from three underlying asynchronous sequences
|
||||
///
|
||||
/// In a `AsyncMerge3Sequence` instance, the *i*th element is the *i*th element
|
||||
/// resolved in sequential order out of the two underyling asynchronous sequences.
|
||||
/// resolved in sequential order out of the two underlying asynchronous sequences.
|
||||
/// Use the `merge(_:_:_:)` function to create an `AsyncMerge3Sequence`.
|
||||
public struct AsyncMerge3Sequence<Base1: AsyncSequence, Base2: AsyncSequence, Base3: AsyncSequence>: AsyncSequence, Sendable
|
||||
where
|
||||
@@ -206,7 +206,7 @@ where
|
||||
return try await apply(task1, task2, nil)
|
||||
|
||||
// 2 terminal
|
||||
// these can be permuted in place since they dont need to run two or more tasks at once
|
||||
// these can be permuted in place since they don't need to run two or more tasks at once
|
||||
case (.terminal, .terminal, .idle(var iterator3)):
|
||||
do {
|
||||
if let value = try await iterator3.next() {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// This is a hack around the fact that we dont have generic effects
|
||||
// This is a hack around the fact that we don't have generic effects
|
||||
// alternatively in the use cases we would want `rethrows(unsafe)`
|
||||
// or something like that to avoid this nifty hack...
|
||||
|
||||
|
||||
@@ -144,7 +144,7 @@ struct WorkQueue: Sendable {
|
||||
items.append(queue.removeFirst())
|
||||
}
|
||||
queues[job] = queue
|
||||
// if there is nothing left in this queue then dont bother with it anymore
|
||||
// if there is nothing left in this queue then don't bother with it anymore
|
||||
if queue.count == 0 {
|
||||
jobsToRemove.insert(jobIndex)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user