From ff04609b129f990cbc0c4fd064f9bf6c77c9dee3 Mon Sep 17 00:00:00 2001 From: Jeff Lewis Date: Wed, 5 Oct 2022 09:16:15 -0400 Subject: [PATCH] make initializers '@usableFromInline' instead of '@inlinable' to support building for library evolution --- 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 7a9e9a3c..2417a4b6 100644 --- a/Sources/AsyncAlgorithms/AsyncChunkedByGroupSequence.swift +++ b/Sources/AsyncAlgorithms/AsyncChunkedByGroupSequence.swift @@ -103,7 +103,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 ccd15187..2cd30422 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 9ac7f97d..d50d721e 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 22395dac..954f9e26 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 90ac51f7..60f3aa42 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