Skip to content

Commit 19b332c

Browse files
committed
[gardening] Delete Trailing Whitespace
1 parent 8e527ed commit 19b332c

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

stdlib/public/core/String.swift

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ extension String {
427427
}
428428
return
429429
}
430-
430+
431431
/// Creates a new string with the specified capacity in UTF-8 code units, and
432432
/// then calls the given closure with a buffer covering the string's
433433
/// uninitialized memory.
@@ -484,7 +484,7 @@ extension String {
484484
initializingUTF8With: initializer
485485
)
486486
}
487-
487+
488488
@inline(__always)
489489
internal init(
490490
_uninitializedCapacity capacity: Int,
@@ -503,7 +503,7 @@ extension String {
503503
}
504504
return
505505
}
506-
506+
507507
self = try String._fromLargeUTF8Repairing(
508508
uninitializedCapacity: capacity,
509509
initializingWith: initializer)
@@ -968,20 +968,20 @@ extension _StringGutsSlice {
968968
var outputBuffer = outputBuffer
969969
var icuInputBuffer = icuInputBuffer
970970
var icuOutputBuffer = icuOutputBuffer
971-
971+
972972
var index = range.lowerBound
973973
let cachedEndIndex = range.upperBound
974-
974+
975975
var hasBufferOwnership = false
976-
976+
977977
defer {
978978
if hasBufferOwnership {
979979
outputBuffer.deallocate()
980980
icuInputBuffer.deallocate()
981981
icuOutputBuffer.deallocate()
982982
}
983983
}
984-
984+
985985
while index < cachedEndIndex {
986986
let result = _foreignNormalize(
987987
readIndex: index,
@@ -1017,17 +1017,17 @@ internal func _fastWithNormalizedCodeUnitsImpl(
10171017

10181018
var index = String.Index(_encodedOffset: 0)
10191019
let cachedEndIndex = String.Index(_encodedOffset: sourceBuffer.count)
1020-
1020+
10211021
var hasBufferOwnership = false
1022-
1022+
10231023
defer {
10241024
if hasBufferOwnership {
10251025
outputBuffer.deallocate()
10261026
icuInputBuffer.deallocate()
10271027
icuOutputBuffer.deallocate()
10281028
}
10291029
}
1030-
1030+
10311031
while index < cachedEndIndex {
10321032
let result = _fastNormalize(
10331033
readIndex: index,

stdlib/public/core/StringCreate.swift

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ internal func _allASCII(_ input: UnsafeBufferPointer<UInt8>) -> Bool {
5050
}
5151

5252
extension String {
53-
53+
5454
internal static func _uncheckedFromASCII(
5555
_ input: UnsafeBufferPointer<UInt8>
5656
) -> String {
@@ -61,15 +61,15 @@ extension String {
6161
let storage = __StringStorage.create(initializingFrom: input, isASCII: true)
6262
return storage.asString
6363
}
64-
64+
6565
@usableFromInline
6666
internal static func _fromASCII(
6767
_ input: UnsafeBufferPointer<UInt8>
6868
) -> String {
6969
_internalInvariant(_allASCII(input), "not actually ASCII")
7070
return _uncheckedFromASCII(input)
7171
}
72-
72+
7373
internal static func _fromASCIIValidating(
7474
_ input: UnsafeBufferPointer<UInt8>
7575
) -> String? {
@@ -101,7 +101,7 @@ extension String {
101101
return (repairUTF8(input, firstKnownBrokenRange: initialRange), true)
102102
}
103103
}
104-
104+
105105
internal static func _fromLargeUTF8Repairing(
106106
uninitializedCapacity capacity: Int,
107107
initializingWith initializer: (
@@ -111,7 +111,7 @@ extension String {
111111
let result = try __StringStorage.create(
112112
uninitializedCodeUnitCapacity: capacity,
113113
initializingUncheckedUTF8With: initializer)
114-
114+
115115
switch validateUTF8(result.codeUnits) {
116116
case .success(let info):
117117
result._updateCountAndFlags(
@@ -181,7 +181,7 @@ extension String {
181181

182182
return contents.withUnsafeBufferPointer { String._uncheckedFromUTF8($0) }
183183
}
184-
184+
185185
@inline(never) // slow path
186186
private static func _slowFromCodeUnits<
187187
Input: Collection,
@@ -209,7 +209,7 @@ extension String {
209209
let str = contents.withUnsafeBufferPointer { String._uncheckedFromUTF8($0) }
210210
return (str, repaired)
211211
}
212-
212+
213213
@usableFromInline @inline(never) // can't be inlined w/out breaking ABI
214214
@_specialize(
215215
where Input == UnsafeBufferPointer<UInt8>, Encoding == Unicode.ASCII)
@@ -227,9 +227,9 @@ extension String {
227227
guard _fastPath(encoding == Unicode.ASCII.self) else {
228228
return _slowFromCodeUnits(input, encoding: encoding, repair: repair)
229229
}
230-
230+
231231
var result:String? = nil
232-
232+
233233
if let contigBytes = input as? _HasContiguousBytes,
234234
contigBytes._providesContiguousBytesNoCopy {
235235
result = contigBytes.withUnsafeBytes { rawBufPtr in
@@ -244,7 +244,7 @@ extension String {
244244
return String._fromASCIIValidating(buffer)
245245
}
246246
}
247-
247+
248248
return result != nil ?
249249
(result!, repairsMade: false) :
250250
_slowFromCodeUnits(input, encoding: encoding, repair: repair)

0 commit comments

Comments
 (0)