@@ -64,7 +64,7 @@ struct BoundedBufferStateMachine<Base: AsyncSequence> {
64
64
mutating func shouldSuspendProducer( ) -> Bool {
65
65
switch state {
66
66
case . initial:
67
- preconditionFailure ( " Invalid state. The task should already by started. " )
67
+ preconditionFailure ( " Invalid state. The task should already be started. " )
68
68
69
69
case . buffering( _, let buffer, . none, . none) :
70
70
// we are either idle or the buffer is already in use (no awaiting consumer)
@@ -95,7 +95,7 @@ struct BoundedBufferStateMachine<Base: AsyncSequence> {
95
95
mutating func producerSuspended( continuation: SuspendedProducer ) -> ProducerSuspendedAction {
96
96
switch self . state {
97
97
case . initial:
98
- preconditionFailure ( " Invalid state. The task should already by started. " )
98
+ preconditionFailure ( " Invalid state. The task should already be started. " )
99
99
100
100
case . buffering( let task, let buffer, . none, . none) :
101
101
// we are either idle or the buffer is already in use (no awaiting consumer)
@@ -132,7 +132,7 @@ struct BoundedBufferStateMachine<Base: AsyncSequence> {
132
132
mutating func elementProduced( element: Element ) -> ElementProducedAction {
133
133
switch self . state {
134
134
case . initial:
135
- preconditionFailure ( " Invalid state. The task should already by started. " )
135
+ preconditionFailure ( " Invalid state. The task should already be started. " )
136
136
137
137
case . buffering( let task, var buffer, . none, . none) :
138
138
// we are either idle or the buffer is already in use (no awaiting consumer)
@@ -170,7 +170,7 @@ struct BoundedBufferStateMachine<Base: AsyncSequence> {
170
170
mutating func finish( error: Error ? ) -> FinishAction {
171
171
switch self . state {
172
172
case . initial:
173
- preconditionFailure ( " Invalid state. The task should already by started. " )
173
+ preconditionFailure ( " Invalid state. The task should already be started. " )
174
174
175
175
case . buffering( _, var buffer, . none, . none) :
176
176
// we are either idle or the buffer is already in use (no awaiting consumer)
@@ -245,7 +245,7 @@ struct BoundedBufferStateMachine<Base: AsyncSequence> {
245
245
mutating func nextSuspended( continuation: SuspendedConsumer ) -> NextSuspendedAction {
246
246
switch self . state {
247
247
case . initial:
248
- preconditionFailure ( " Invalid state. The task should already by started. " )
248
+ preconditionFailure ( " Invalid state. The task should already be started. " )
249
249
250
250
case . buffering( let task, let buffer, . none, . none) where buffer. isEmpty:
251
251
// we are idle, we confirm the suspension of the consumer
0 commit comments