Skip to content

Commit f8b0213

Browse files
committed
Spell rethrows as throws in ABI-compatibility functions
1 parent 955a7e9 commit f8b0213

File tree

6 files changed

+24
-24
lines changed

6 files changed

+24
-24
lines changed

Sources/FoundationEssentials/Data/Data.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -351,10 +351,10 @@ public struct Data : RandomAccessCollection, MutableCollection, RangeReplaceable
351351
}
352352

353353
#if FOUNDATION_FRAMEWORK
354-
@abi(func withUnsafeBytes<R>(_: (UnsafeRawBufferPointer) throws -> R) rethrows -> R)
354+
@abi(func withUnsafeBytes<R>(_: (UnsafeRawBufferPointer) throws -> R) throws -> R)
355355
@_spi(FoundationLegacyABI)
356356
@usableFromInline
357-
internal func _legacy_withUnsafeBytes<ResultType>(_ body: (UnsafeRawBufferPointer) throws -> ResultType) rethrows -> ResultType {
357+
internal func _legacy_withUnsafeBytes<ResultType>(_ body: (UnsafeRawBufferPointer) throws -> ResultType) throws -> ResultType {
358358
try withUnsafeBytes(body)
359359
}
360360
#endif // FOUNDATION_FRAMEWORK
@@ -488,10 +488,10 @@ public struct Data : RandomAccessCollection, MutableCollection, RangeReplaceable
488488
}
489489

490490
#if FOUNDATION_FRAMEWORK
491-
@abi(mutating func withUnsafeMutableBytes<R>(_: (UnsafeMutableRawBufferPointer) throws -> R) rethrows -> R)
491+
@abi(mutating func withUnsafeMutableBytes<R>(_: (UnsafeMutableRawBufferPointer) throws -> R) throws -> R)
492492
@_spi(FoundationLegacyABI)
493493
@usableFromInline
494-
internal mutating func _legacy_withUnsafeMutableBytes<ResultType>(_ body: (UnsafeMutableRawBufferPointer) throws -> ResultType) rethrows -> ResultType {
494+
internal mutating func _legacy_withUnsafeMutableBytes<ResultType>(_ body: (UnsafeMutableRawBufferPointer) throws -> ResultType) throws -> ResultType {
495495
try withUnsafeMutableBytes(body)
496496
}
497497
#endif // FOUNDATION_FRAMEWORK

Sources/FoundationEssentials/Data/Representations/Data+Inline.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,10 @@ extension Data {
134134
}
135135

136136
#if FOUNDATION_FRAMEWORK
137-
@abi(func withUnsafeBytes<R>(_: (UnsafeRawBufferPointer) throws -> R) rethrows -> R)
137+
@abi(func withUnsafeBytes<R>(_: (UnsafeRawBufferPointer) throws -> R) throws -> R)
138138
@_spi(FoundationLegacyABI)
139139
@usableFromInline
140-
internal func _legacy_withUnsafeBytes<ResultType>(_ body: (UnsafeRawBufferPointer) throws -> ResultType) rethrows -> ResultType {
140+
internal func _legacy_withUnsafeBytes<ResultType>(_ body: (UnsafeRawBufferPointer) throws -> ResultType) throws -> ResultType {
141141
try withUnsafeBytes(body)
142142
}
143143
#endif // FOUNDATION_FRAMEWORK
@@ -150,10 +150,10 @@ extension Data {
150150
}
151151

152152
#if FOUNDATION_FRAMEWORK
153-
@abi(mutating func withUnsafeMutableBytes<R>(_: (UnsafeMutableRawBufferPointer) throws -> R) rethrows -> R)
153+
@abi(mutating func withUnsafeMutableBytes<R>(_: (UnsafeMutableRawBufferPointer) throws -> R) throws -> R)
154154
@_spi(FoundationLegacyABI)
155155
@usableFromInline
156-
internal mutating func _legacy_withUnsafeMutableBytes<ResultType>(_ body: (UnsafeMutableRawBufferPointer) throws -> ResultType) rethrows -> ResultType {
156+
internal mutating func _legacy_withUnsafeMutableBytes<ResultType>(_ body: (UnsafeMutableRawBufferPointer) throws -> ResultType) throws -> ResultType {
157157
try withUnsafeMutableBytes(body)
158158
}
159159
#endif // FOUNDATION_FRAMEWORK

Sources/FoundationEssentials/Data/Representations/Data+InlineSlice.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,10 @@ extension Data {
163163
}
164164

165165
#if FOUNDATION_FRAMEWORK
166-
@abi(func withUnsafeBytes<R>(_: (UnsafeRawBufferPointer) throws -> R) rethrows -> R)
166+
@abi(func withUnsafeBytes<R>(_: (UnsafeRawBufferPointer) throws -> R) throws -> R)
167167
@_spi(FoundationLegacyABI)
168168
@usableFromInline
169-
internal func _legacy_withUnsafeBytes<ResultType>(_ body: (UnsafeRawBufferPointer) throws -> ResultType) rethrows -> ResultType {
169+
internal func _legacy_withUnsafeBytes<ResultType>(_ body: (UnsafeRawBufferPointer) throws -> ResultType) throws -> ResultType {
170170
try withUnsafeBytes(body)
171171
}
172172
#endif // FOUNDATION_FRAMEWORK
@@ -178,10 +178,10 @@ extension Data {
178178
}
179179

180180
#if FOUNDATION_FRAMEWORK
181-
@abi(mutating func withUnsafeMutableBytes<R>(_: (UnsafeMutableRawBufferPointer) throws -> R) rethrows -> R)
181+
@abi(mutating func withUnsafeMutableBytes<R>(_: (UnsafeMutableRawBufferPointer) throws -> R) throws -> R)
182182
@_spi(FoundationLegacyABI)
183183
@usableFromInline
184-
internal mutating func _legacy_withUnsafeMutableBytes<ResultType>(_ body: (UnsafeMutableRawBufferPointer) throws -> ResultType) rethrows -> ResultType {
184+
internal mutating func _legacy_withUnsafeMutableBytes<ResultType>(_ body: (UnsafeMutableRawBufferPointer) throws -> ResultType) throws -> ResultType {
185185
try withUnsafeMutableBytes(body)
186186
}
187187
#endif // FOUNDATION_FRAMEWORK

Sources/FoundationEssentials/Data/Representations/Data+LargeSlice.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,10 @@ extension Data {
151151
}
152152

153153
#if FOUNDATION_FRAMEWORK
154-
@abi(func withUnsafeBytes<R>(_: (UnsafeRawBufferPointer) throws -> R) rethrows -> R)
154+
@abi(func withUnsafeBytes<R>(_: (UnsafeRawBufferPointer) throws -> R) throws -> R)
155155
@_spi(FoundationLegacyABI)
156156
@usableFromInline
157-
internal func _legacy_withUnsafeBytes<ResultType>(_ body: (UnsafeRawBufferPointer) throws -> ResultType) rethrows -> ResultType {
157+
internal func _legacy_withUnsafeBytes<ResultType>(_ body: (UnsafeRawBufferPointer) throws -> ResultType) throws -> ResultType {
158158
try withUnsafeBytes(body)
159159
}
160160
#endif // FOUNDATION_FRAMEWORK
@@ -166,10 +166,10 @@ extension Data {
166166
}
167167

168168
#if FOUNDATION_FRAMEWORK
169-
@abi(mutating func withUnsafeMutableBytes<R>(_: (UnsafeMutableRawBufferPointer) throws -> R) rethrows -> R)
169+
@abi(mutating func withUnsafeMutableBytes<R>(_: (UnsafeMutableRawBufferPointer) throws -> R) throws -> R)
170170
@_spi(FoundationLegacyABI)
171171
@usableFromInline
172-
internal mutating func _legacy_withUnsafeMutableBytes<ResultType>(_ body: (UnsafeMutableRawBufferPointer) throws -> ResultType) rethrows -> ResultType {
172+
internal mutating func _legacy_withUnsafeMutableBytes<ResultType>(_ body: (UnsafeMutableRawBufferPointer) throws -> ResultType) throws -> ResultType {
173173
try withUnsafeMutableBytes(body)
174174
}
175175
#endif // FOUNDATION_FRAMEWORK

Sources/FoundationEssentials/Data/Representations/Data+Representation.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,10 +229,10 @@ extension Data {
229229
}
230230

231231
#if FOUNDATION_FRAMEWORK
232-
@abi(func withUnsafeBytes<R>(_: (UnsafeRawBufferPointer) throws -> R) rethrows -> R)
232+
@abi(func withUnsafeBytes<R>(_: (UnsafeRawBufferPointer) throws -> R) throws -> R)
233233
@_spi(FoundationLegacyABI)
234234
@usableFromInline
235-
internal func _legacy_withUnsafeBytes<ResultType>(_ body: (UnsafeRawBufferPointer) throws -> ResultType) rethrows -> ResultType {
235+
internal func _legacy_withUnsafeBytes<ResultType>(_ body: (UnsafeRawBufferPointer) throws -> ResultType) throws -> ResultType {
236236
try withUnsafeBytes(body)
237237
}
238238
#endif // FOUNDATION_FRAMEWORK
@@ -258,10 +258,10 @@ extension Data {
258258
}
259259

260260
#if FOUNDATION_FRAMEWORK
261-
@abi(mutating func withUnsafeMutableBytes<R>(_: (UnsafeMutableRawBufferPointer) throws -> R) rethrows -> R)
261+
@abi(mutating func withUnsafeMutableBytes<R>(_: (UnsafeMutableRawBufferPointer) throws -> R) throws -> R)
262262
@_spi(FoundationLegacyABI)
263263
@usableFromInline
264-
internal mutating func _legacy_withUnsafeMutableBytes<ResultType>(_ body: (UnsafeMutableRawBufferPointer) throws -> ResultType) rethrows -> ResultType {
264+
internal mutating func _legacy_withUnsafeMutableBytes<ResultType>(_ body: (UnsafeMutableRawBufferPointer) throws -> ResultType) throws -> ResultType {
265265
try withUnsafeMutableBytes(body)
266266
}
267267
#endif // FOUNDATION_FRAMEWORK

Sources/FoundationEssentials/Data/Representations/DataStorage.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,10 @@ internal final class __DataStorage : @unchecked Sendable {
103103
}
104104

105105
#if FOUNDATION_FRAMEWORK
106-
@abi(func withUnsafeBytes<R>(in: Range<Int>, apply: (UnsafeRawBufferPointer) throws -> R) rethrows -> R)
106+
@abi(func withUnsafeBytes<R>(in: Range<Int>, apply: (UnsafeRawBufferPointer) throws -> R) throws -> R)
107107
@_spi(FoundationLegacyABI)
108108
@usableFromInline
109-
func _legacy_withUnsafeBytes<Result>(in range: Range<Int>, apply: (UnsafeRawBufferPointer) throws -> Result) rethrows -> Result {
109+
func _legacy_withUnsafeBytes<Result>(in range: Range<Int>, apply: (UnsafeRawBufferPointer) throws -> Result) throws -> Result {
110110
try withUnsafeBytes(in: range, apply: apply)
111111
}
112112
#endif // FOUNDATION_FRAMEWORK
@@ -117,10 +117,10 @@ internal final class __DataStorage : @unchecked Sendable {
117117
}
118118

119119
#if FOUNDATION_FRAMEWORK
120-
@abi(func withUnsafeMutableBytes<R>(in: Range<Int>, apply: (UnsafeMutableRawBufferPointer) throws -> R) rethrows -> R)
120+
@abi(func withUnsafeMutableBytes<R>(in: Range<Int>, apply: (UnsafeMutableRawBufferPointer) throws -> R) throws -> R)
121121
@_spi(FoundationLegacyABI)
122122
@usableFromInline
123-
internal func _legacy_withUnsafeMutableBytes<ResultType>(in range: Range<Int>, apply: (UnsafeMutableRawBufferPointer) throws -> ResultType) rethrows -> ResultType {
123+
internal func _legacy_withUnsafeMutableBytes<ResultType>(in range: Range<Int>, apply: (UnsafeMutableRawBufferPointer) throws -> ResultType) throws -> ResultType {
124124
try withUnsafeMutableBytes(in: range, apply: apply)
125125
}
126126
#endif // FOUNDATION_FRAMEWORK

0 commit comments

Comments
 (0)