Skip to content

Commit 9274790

Browse files
authored
Audit pass on inline and initialization (#271)
1 parent ac9309b commit 9274790

8 files changed

+12
-12
lines changed

Sources/AsyncAlgorithms/AsyncInclusiveReductionsSequence.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ extension AsyncInclusiveReductionsSequence: AsyncSequence {
5858
internal let transform: @Sendable (Base.Element, Base.Element) async -> Base.Element
5959

6060
@inlinable
61-
internal init(
61+
init(
6262
_ iterator: Base.AsyncIterator,
6363
transform: @Sendable @escaping (Base.Element, Base.Element) async -> Base.Element
6464
) {

Sources/AsyncAlgorithms/AsyncThrowingInclusiveReductionsSequence.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ extension AsyncThrowingInclusiveReductionsSequence: AsyncSequence {
5757
internal let transform: @Sendable (Base.Element, Base.Element) async throws -> Base.Element
5858

5959
@inlinable
60-
internal init(
60+
init(
6161
_ iterator: Base.AsyncIterator,
6262
transform: @Sendable @escaping (Base.Element, Base.Element) async throws -> Base.Element
6363
) {

Sources/AsyncAlgorithms/Buffer/AsyncBufferSequence.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public struct AsyncBufferSequencePolicy: Sendable {
7070

7171
/// An `AsyncSequence` that buffers elements in regard to a policy.
7272
public struct AsyncBufferSequence<Base: AsyncSequence & Sendable>: AsyncSequence {
73-
enum StorageType<Base: AsyncSequence> {
73+
enum StorageType {
7474
case transparent(Base.AsyncIterator)
7575
case bounded(storage: BoundedBufferStorage<Base>)
7676
case unbounded(storage: UnboundedBufferStorage<Base>)
@@ -82,7 +82,7 @@ public struct AsyncBufferSequence<Base: AsyncSequence & Sendable>: AsyncSequence
8282
let base: Base
8383
let policy: AsyncBufferSequencePolicy
8484

85-
public init(
85+
init(
8686
base: Base,
8787
policy: AsyncBufferSequencePolicy
8888
) {
@@ -91,7 +91,7 @@ public struct AsyncBufferSequence<Base: AsyncSequence & Sendable>: AsyncSequence
9191
}
9292

9393
public func makeAsyncIterator() -> Iterator {
94-
let storageType: StorageType<Base>
94+
let storageType: StorageType
9595
switch self.policy.policy {
9696
case .bounded(...0), .bufferingNewest(...0), .bufferingOldest(...0):
9797
storageType = .transparent(self.base.makeAsyncIterator())
@@ -108,7 +108,7 @@ public struct AsyncBufferSequence<Base: AsyncSequence & Sendable>: AsyncSequence
108108
}
109109

110110
public struct Iterator: AsyncIteratorProtocol {
111-
var storageType: StorageType<Base>
111+
var storageType: StorageType
112112

113113
public mutating func next() async rethrows -> Element? {
114114
switch self.storageType {

Sources/AsyncAlgorithms/CombineLatest/AsyncCombineLatest2Sequence.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public struct AsyncCombineLatest2Sequence<
4646
let base1: Base1
4747
let base2: Base2
4848

49-
public init(_ base1: Base1, _ base2: Base2) {
49+
init(_ base1: Base1, _ base2: Base2) {
5050
self.base1 = base1
5151
self.base2 = base2
5252
}

Sources/AsyncAlgorithms/Debounce/AsyncDebounceSequence.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public struct AsyncDebounceSequence<Base: AsyncSequence, C: Clock>: Sendable whe
4141
/// - interval: The interval to debounce.
4242
/// - tolerance: The tolerance of the clock.
4343
/// - clock: The clock.
44-
public init(_ base: Base, interval: C.Instant.Duration, tolerance: C.Instant.Duration?, clock: C) {
44+
init(_ base: Base, interval: C.Instant.Duration, tolerance: C.Instant.Duration?, clock: C) {
4545
self.base = base
4646
self.interval = interval
4747
self.tolerance = tolerance

Sources/AsyncAlgorithms/Interspersed/AsyncInterspersedSequence.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public struct AsyncInterspersedSequence<Base: AsyncSequence> {
4545
internal let separator: Base.Element
4646

4747
@usableFromInline
48-
internal init(_ base: Base, separator: Base.Element) {
48+
init(_ base: Base, separator: Base.Element) {
4949
self.base = base
5050
self.separator = separator
5151
}
@@ -73,7 +73,7 @@ extension AsyncInterspersedSequence: AsyncSequence {
7373
internal var state = State.start
7474

7575
@usableFromInline
76-
internal init(_ iterator: Base.AsyncIterator, separator: Base.Element) {
76+
init(_ iterator: Base.AsyncIterator, separator: Base.Element) {
7777
self.iterator = iterator
7878
self.separator = separator
7979
}

Sources/AsyncAlgorithms/Merge/AsyncMerge2Sequence.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public struct AsyncMerge2Sequence<
4040
/// - Parameters:
4141
/// - base1: The first upstream ``Swift/AsyncSequence``.
4242
/// - base2: The second upstream ``Swift/AsyncSequence``.
43-
public init(
43+
init(
4444
_ base1: Base1,
4545
_ base2: Base2
4646
) {

Sources/AsyncAlgorithms/Merge/AsyncMerge3Sequence.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public struct AsyncMerge3Sequence<
4949
/// - base1: The first upstream ``Swift/AsyncSequence``.
5050
/// - base2: The second upstream ``Swift/AsyncSequence``.
5151
/// - base3: The third upstream ``Swift/AsyncSequence``.
52-
public init(
52+
init(
5353
_ base1: Base1,
5454
_ base2: Base2,
5555
_ base3: Base3

0 commit comments

Comments
 (0)