From 4feeb83d135f135566fdb307256cf777c0b94c6b Mon Sep 17 00:00:00 2001 From: Jeff Lewis Date: Wed, 5 Oct 2022 12:39:14 -0400 Subject: [PATCH] make initializers '@usableFromInline' instead of '@inlinable' to support building for library evolution (#205) --- Sources/AsyncAlgorithms/AsyncChunkedByGroupSequence.swift | 2 +- .../AsyncAlgorithms/AsyncChunkedOnProjectionSequence.swift | 3 +-- Sources/AsyncAlgorithms/AsyncChunksOfCountSequence.swift | 2 +- Sources/AsyncAlgorithms/AsyncInterspersedSequence.swift | 4 ++-- Sources/AsyncAlgorithms/AsyncJoinedBySeparatorSequence.swift | 4 ++-- Sources/AsyncAlgorithms/AsyncJoinedSequence.swift | 2 +- Sources/AsyncAlgorithms/AsyncRemoveDuplicatesSequence.swift | 4 ++-- 7 files changed, 10 insertions(+), 11 deletions(-) diff --git a/Sources/AsyncAlgorithms/AsyncChunkedByGroupSequence.swift b/Sources/AsyncAlgorithms/AsyncChunkedByGroupSequence.swift index 9815462..26faafe 100644 --- a/Sources/AsyncAlgorithms/AsyncChunkedByGroupSequence.swift +++ b/Sources/AsyncAlgorithms/AsyncChunkedByGroupSequence.swift @@ -104,7 +104,7 @@ public struct AsyncChunkedByGroupSequence Bool - @inlinable + @usableFromInline init(_ base: Base, grouping: @escaping @Sendable (Base.Element, Base.Element) -> Bool) { self.base = base self.grouping = grouping diff --git a/Sources/AsyncAlgorithms/AsyncChunkedOnProjectionSequence.swift b/Sources/AsyncAlgorithms/AsyncChunkedOnProjectionSequence.swift index ccd1518..2cd3042 100644 --- a/Sources/AsyncAlgorithms/AsyncChunkedOnProjectionSequence.swift +++ b/Sources/AsyncAlgorithms/AsyncChunkedOnProjectionSequence.swift @@ -84,7 +84,7 @@ public struct AsyncChunkedOnProjectionSequence Subject - @inlinable + @usableFromInline init(_ base: Base, projection: @escaping @Sendable (Base.Element) -> Subject) { self.base = base self.projection = projection @@ -98,4 +98,3 @@ public struct AsyncChunkedOnProjectionSequence 0) self.base = base diff --git a/Sources/AsyncAlgorithms/AsyncInterspersedSequence.swift b/Sources/AsyncAlgorithms/AsyncInterspersedSequence.swift index 9ac7f97..d50d721 100644 --- a/Sources/AsyncAlgorithms/AsyncInterspersedSequence.swift +++ b/Sources/AsyncAlgorithms/AsyncInterspersedSequence.swift @@ -33,7 +33,7 @@ public struct AsyncInterspersedSequence { @usableFromInline internal let separator: Base.Element - @inlinable + @usableFromInline internal init(_ base: Base, separator: Base.Element) { self.base = base self.separator = separator @@ -61,7 +61,7 @@ extension AsyncInterspersedSequence: AsyncSequence { @usableFromInline internal var state = State.start - @inlinable + @usableFromInline internal init(_ iterator: Base.AsyncIterator, separator: Base.Element) { self.iterator = iterator self.separator = separator diff --git a/Sources/AsyncAlgorithms/AsyncJoinedBySeparatorSequence.swift b/Sources/AsyncAlgorithms/AsyncJoinedBySeparatorSequence.swift index 22395da..954f9e2 100644 --- a/Sources/AsyncAlgorithms/AsyncJoinedBySeparatorSequence.swift +++ b/Sources/AsyncAlgorithms/AsyncJoinedBySeparatorSequence.swift @@ -74,7 +74,7 @@ public struct AsyncJoinedBySeparatorSequence: AsyncSequence where Base @usableFromInline let base: Base - @inlinable + @usableFromInline init(_ base: Base) { self.base = base } diff --git a/Sources/AsyncAlgorithms/AsyncRemoveDuplicatesSequence.swift b/Sources/AsyncAlgorithms/AsyncRemoveDuplicatesSequence.swift index 90ac51f..60f3aa4 100644 --- a/Sources/AsyncAlgorithms/AsyncRemoveDuplicatesSequence.swift +++ b/Sources/AsyncAlgorithms/AsyncRemoveDuplicatesSequence.swift @@ -46,7 +46,7 @@ public struct AsyncRemoveDuplicatesSequence: AsyncSequence @usableFromInline var last: Element? - @inlinable + @usableFromInline init(iterator: Base.AsyncIterator, predicate: @escaping @Sendable (Element, Element) async -> Bool) { self.iterator = iterator self.predicate = predicate @@ -105,7 +105,7 @@ public struct AsyncThrowingRemoveDuplicatesSequence: AsyncS @usableFromInline var last: Element? - @inlinable + @usableFromInline init(iterator: Base.AsyncIterator, predicate: @escaping @Sendable (Element, Element) async throws -> Bool) { self.iterator = iterator self.predicate = predicate