Skip to content

Commit da61cc8

Browse files
authored
Merge pull request #26218 from twostraws/colon-collapse-disorder
[Gardening] Replaced many instances of ' : ' with ': '
2 parents d0f81c5 + 06f82a5 commit da61cc8

File tree

101 files changed

+718
-718
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+718
-718
lines changed

stdlib/public/core/ASCII.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ extension Unicode {
1414
public enum ASCII {}
1515
}
1616

17-
extension Unicode.ASCII : Unicode.Encoding {
17+
extension Unicode.ASCII: Unicode.Encoding {
1818
public typealias CodeUnit = UInt8
1919
public typealias EncodedScalar = CollectionOfOne<CodeUnit>
2020

2121
@inlinable
22-
public static var encodedReplacementCharacter : EncodedScalar {
22+
public static var encodedReplacementCharacter: EncodedScalar {
2323
return EncodedScalar(0x1a) // U+001A SUBSTITUTE; best we can do for ASCII
2424
}
2525

@@ -51,7 +51,7 @@ extension Unicode.ASCII : Unicode.Encoding {
5151

5252
@inline(__always)
5353
@inlinable
54-
public static func transcode<FromEncoding : Unicode.Encoding>(
54+
public static func transcode<FromEncoding: Unicode.Encoding>(
5555
_ content: FromEncoding.EncodedScalar, from _: FromEncoding.Type
5656
) -> EncodedScalar? {
5757
if _fastPath(FromEncoding.self == UTF16.self) {
@@ -78,12 +78,12 @@ extension Unicode.ASCII : Unicode.Encoding {
7878
public typealias ReverseParser = Parser
7979
}
8080

81-
extension Unicode.ASCII.Parser : Unicode.Parser {
81+
extension Unicode.ASCII.Parser: Unicode.Parser {
8282
public typealias Encoding = Unicode.ASCII
8383

8484
/// Parses a single Unicode scalar value from `input`.
8585
@inlinable
86-
public mutating func parseScalar<I : IteratorProtocol>(
86+
public mutating func parseScalar<I: IteratorProtocol>(
8787
from input: inout I
8888
) -> Unicode.ParseResult<Encoding.EncodedScalar>
8989
where I.Element == Encoding.CodeUnit {

stdlib/public/core/Algorithm.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
/// - y: Another value to compare.
1818
/// - Returns: The lesser of `x` and `y`. If `x` is equal to `y`, returns `x`.
1919
@inlinable // protocol-only
20-
public func min<T : Comparable>(_ x: T, _ y: T) -> T {
20+
public func min<T: Comparable>(_ x: T, _ y: T) -> T {
2121
// In case `x == y` we pick `x`.
2222
// This preserves any pre-existing order in case `T` has identity,
2323
// which is important for e.g. the stability of sorting algorithms.
@@ -35,7 +35,7 @@ public func min<T : Comparable>(_ x: T, _ y: T) -> T {
3535
/// - Returns: The least of all the arguments. If there are multiple equal
3636
/// least arguments, the result is the first one.
3737
@inlinable // protocol-only
38-
public func min<T : Comparable>(_ x: T, _ y: T, _ z: T, _ rest: T...) -> T {
38+
public func min<T: Comparable>(_ x: T, _ y: T, _ z: T, _ rest: T...) -> T {
3939
var minValue = min(min(x, y), z)
4040
// In case `value == minValue`, we pick `minValue`. See min(_:_:).
4141
for value in rest where value < minValue {
@@ -51,7 +51,7 @@ public func min<T : Comparable>(_ x: T, _ y: T, _ z: T, _ rest: T...) -> T {
5151
/// - y: Another value to compare.
5252
/// - Returns: The greater of `x` and `y`. If `x` is equal to `y`, returns `y`.
5353
@inlinable // protocol-only
54-
public func max<T : Comparable>(_ x: T, _ y: T) -> T {
54+
public func max<T: Comparable>(_ x: T, _ y: T) -> T {
5555
// In case `x == y`, we pick `y`. See min(_:_:).
5656
return y >= x ? y : x
5757
}
@@ -66,7 +66,7 @@ public func max<T : Comparable>(_ x: T, _ y: T) -> T {
6666
/// - Returns: The greatest of all the arguments. If there are multiple equal
6767
/// greatest arguments, the result is the last one.
6868
@inlinable // protocol-only
69-
public func max<T : Comparable>(_ x: T, _ y: T, _ z: T, _ rest: T...) -> T {
69+
public func max<T: Comparable>(_ x: T, _ y: T, _ z: T, _ rest: T...) -> T {
7070
var maxValue = max(max(x, y), z)
7171
// In case `value == maxValue`, we pick `value`. See min(_:_:).
7272
for value in rest where value >= maxValue {

stdlib/public/core/AnyHashable.swift

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ public protocol _HasCustomAnyHashableRepresentation {
2121
/// needs to be boxed into `AnyHashable` using the static
2222
/// type that introduces the `Hashable` conformance.
2323
///
24-
/// class Base : Hashable {}
25-
/// class Derived1 : Base {}
26-
/// class Derived2 : Base, _HasCustomAnyHashableRepresentation {
24+
/// class Base: Hashable {}
25+
/// class Derived1: Base {}
26+
/// class Derived2: Base, _HasCustomAnyHashableRepresentation {
2727
/// func _toCustomAnyHashable() -> AnyHashable? {
2828
/// // `Derived2` is canonicalized to `Derived1`.
2929
/// let customRepresentation = Derived1()
@@ -62,14 +62,14 @@ extension _AnyHashableBox {
6262
}
6363
}
6464

65-
internal struct _ConcreteHashableBox<Base : Hashable> : _AnyHashableBox {
65+
internal struct _ConcreteHashableBox<Base: Hashable>: _AnyHashableBox {
6666
internal var _baseHashable: Base
6767

6868
internal init(_ base: Base) {
6969
self._baseHashable = base
7070
}
7171

72-
internal func _unbox<T : Hashable>() -> T? {
72+
internal func _unbox<T: Hashable>() -> T? {
7373
return (self as _AnyHashableBox as? _ConcreteHashableBox<T>)?._baseHashable
7474
}
7575

@@ -134,7 +134,7 @@ public struct AnyHashable {
134134
/// Creates a type-erased hashable value that wraps the given instance.
135135
///
136136
/// - Parameter base: A hashable value to wrap.
137-
public init<H : Hashable>(_ base: H) {
137+
public init<H: Hashable>(_ base: H) {
138138
if let custom =
139139
(base as? _HasCustomAnyHashableRepresentation)?._toCustomAnyHashable() {
140140
self = custom
@@ -147,7 +147,7 @@ public struct AnyHashable {
147147
storingResultInto: &self)
148148
}
149149

150-
internal init<H : Hashable>(_usingDefaultRepresentationOf base: H) {
150+
internal init<H: Hashable>(_usingDefaultRepresentationOf base: H) {
151151
self._box = _ConcreteHashableBox(base)
152152
}
153153

@@ -187,7 +187,7 @@ public struct AnyHashable {
187187
}
188188
}
189189

190-
extension AnyHashable : Equatable {
190+
extension AnyHashable: Equatable {
191191
/// Returns a Boolean value indicating whether two type-erased hashable
192192
/// instances wrap the same type and value.
193193
///
@@ -203,7 +203,7 @@ extension AnyHashable : Equatable {
203203
}
204204
}
205205

206-
extension AnyHashable : Hashable {
206+
extension AnyHashable: Hashable {
207207
/// The hash value.
208208
public var hashValue: Int {
209209
return _box._canonicalBox._hashValue
@@ -223,19 +223,19 @@ extension AnyHashable : Hashable {
223223
}
224224
}
225225

226-
extension AnyHashable : CustomStringConvertible {
226+
extension AnyHashable: CustomStringConvertible {
227227
public var description: String {
228228
return String(describing: base)
229229
}
230230
}
231231

232-
extension AnyHashable : CustomDebugStringConvertible {
232+
extension AnyHashable: CustomDebugStringConvertible {
233233
public var debugDescription: String {
234234
return "AnyHashable(" + String(reflecting: base) + ")"
235235
}
236236
}
237237

238-
extension AnyHashable : CustomReflectable {
238+
extension AnyHashable: CustomReflectable {
239239
public var customMirror: Mirror {
240240
return Mirror(
241241
self,
@@ -250,7 +250,7 @@ extension AnyHashable : CustomReflectable {
250250
/// conformance, if it exists.
251251
/// Called by AnyHashableSupport.cpp.
252252
@_silgen_name("_swift_makeAnyHashableUsingDefaultRepresentation")
253-
internal func _makeAnyHashableUsingDefaultRepresentation<H : Hashable>(
253+
internal func _makeAnyHashableUsingDefaultRepresentation<H: Hashable>(
254254
of value: H,
255255
storingResultInto result: UnsafeMutablePointer<AnyHashable>
256256
) {
@@ -259,20 +259,20 @@ internal func _makeAnyHashableUsingDefaultRepresentation<H : Hashable>(
259259

260260
/// Provided by AnyHashable.cpp.
261261
@_silgen_name("_swift_makeAnyHashableUpcastingToHashableBaseType")
262-
internal func _makeAnyHashableUpcastingToHashableBaseType<H : Hashable>(
262+
internal func _makeAnyHashableUpcastingToHashableBaseType<H: Hashable>(
263263
_ value: H,
264264
storingResultInto result: UnsafeMutablePointer<AnyHashable>
265265
)
266266

267267
@inlinable
268268
public // COMPILER_INTRINSIC
269-
func _convertToAnyHashable<H : Hashable>(_ value: H) -> AnyHashable {
269+
func _convertToAnyHashable<H: Hashable>(_ value: H) -> AnyHashable {
270270
return AnyHashable(value)
271271
}
272272

273273
/// Called by the casting machinery.
274274
@_silgen_name("_swift_convertToAnyHashableIndirect")
275-
internal func _convertToAnyHashableIndirect<H : Hashable>(
275+
internal func _convertToAnyHashableIndirect<H: Hashable>(
276276
_ value: H,
277277
_ target: UnsafeMutablePointer<AnyHashable>
278278
) {

stdlib/public/core/Array.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1891,7 +1891,7 @@ internal struct _ArrayAnyHashableBox<Element: Hashable>
18911891
return hasher._finalize()
18921892
}
18931893

1894-
internal func _unbox<T : Hashable>() -> T? {
1894+
internal func _unbox<T: Hashable>() -> T? {
18951895
return _value as? T
18961896
}
18971897

stdlib/public/core/ArrayBuffer.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ internal typealias _ArrayBridgeStorage
2424

2525
@usableFromInline
2626
@frozen
27-
internal struct _ArrayBuffer<Element> : _ArrayBufferProtocol {
27+
internal struct _ArrayBuffer<Element>: _ArrayBufferProtocol {
2828

2929
/// Create an empty buffer.
3030
@inlinable

stdlib/public/core/ArrayBufferProtocol.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ where Indices == Range<Int> {
7171
_ subrange: Range<Int>,
7272
with newCount: Int,
7373
elementsOf newValues: __owned C
74-
) where C : Collection, C.Element == Element
74+
) where C: Collection, C.Element == Element
7575

7676
/// Returns a `_SliceBuffer` containing the elements in `bounds`.
7777
subscript(bounds: Range<Int>) -> _SliceBuffer<Element> { get }
@@ -144,7 +144,7 @@ extension _ArrayBufferProtocol where Indices == Range<Int>{
144144
_ subrange: Range<Int>,
145145
with newCount: Int,
146146
elementsOf newValues: __owned C
147-
) where C : Collection, C.Element == Element {
147+
) where C: Collection, C.Element == Element {
148148
_internalInvariant(startIndex == 0, "_SliceBuffer should override this function.")
149149
let oldCount = self.count
150150
let eraseCount = subrange.count

stdlib/public/core/Bool.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ public struct Bool {
140140
}
141141
}
142142

143-
extension Bool : _ExpressibleByBuiltinBooleanLiteral, ExpressibleByBooleanLiteral {
143+
extension Bool: _ExpressibleByBuiltinBooleanLiteral, ExpressibleByBooleanLiteral {
144144
@_transparent
145145
public init(_builtinBooleanLiteral value: Builtin.Int1) {
146146
self._value = value
@@ -170,7 +170,7 @@ extension Bool : _ExpressibleByBuiltinBooleanLiteral, ExpressibleByBooleanLitera
170170
}
171171
}
172172

173-
extension Bool : CustomStringConvertible {
173+
extension Bool: CustomStringConvertible {
174174
/// A textual representation of the Boolean value.
175175
@inlinable
176176
public var description: String {
@@ -197,7 +197,7 @@ extension Bool: Hashable {
197197
}
198198
}
199199

200-
extension Bool : LosslessStringConvertible {
200+
extension Bool: LosslessStringConvertible {
201201
/// Creates a new Boolean value from the given string.
202202
///
203203
/// If the `description` value is any string other than `"true"` or

stdlib/public/core/BridgeObjectiveC.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
/// or NSDictionary will be the result of calling `_bridgeToObjectiveC`
1717
/// on each element of the source container.
1818
public protocol _ObjectiveCBridgeable {
19-
associatedtype _ObjectiveCType : AnyObject
19+
associatedtype _ObjectiveCType: AnyObject
2020

2121
/// Convert `self` to Objective-C.
2222
func _bridgeToObjectiveC() -> _ObjectiveCType

stdlib/public/core/Builtin.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,13 +231,13 @@ public func _unsafeReferenceCast<T, U>(_ x: T, to: U.Type) -> U {
231231
/// - type: The type `T` to which `x` is cast.
232232
/// - Returns: The instance `x`, cast to type `T`.
233233
@_transparent
234-
public func unsafeDowncast<T : AnyObject>(_ x: AnyObject, to type: T.Type) -> T {
234+
public func unsafeDowncast<T: AnyObject>(_ x: AnyObject, to type: T.Type) -> T {
235235
_debugPrecondition(x is T, "invalid unsafeDowncast")
236236
return Builtin.castReference(x)
237237
}
238238

239239
@_transparent
240-
public func _unsafeUncheckedDowncast<T : AnyObject>(_ x: AnyObject, to type: T.Type) -> T {
240+
public func _unsafeUncheckedDowncast<T: AnyObject>(_ x: AnyObject, to type: T.Type) -> T {
241241
_internalInvariant(x is T, "invalid unsafeDowncast")
242242
return Builtin.castReference(x)
243243
}
@@ -778,7 +778,7 @@ func _trueAfterDiagnostics() -> Builtin.Int1 {
778778
/// }
779779
/// }
780780
///
781-
/// class EmojiSmiley : Smiley {
781+
/// class EmojiSmiley: Smiley {
782782
/// override class var text: String {
783783
/// return "😀"
784784
/// }

stdlib/public/core/CString.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ extension String {
140140
@_specialize(where Encoding == Unicode.UTF8)
141141
@_specialize(where Encoding == Unicode.UTF16)
142142
@inlinable // Fold away specializations
143-
public static func decodeCString<Encoding : _UnicodeEncoding>(
143+
public static func decodeCString<Encoding: _UnicodeEncoding>(
144144
_ cString: UnsafePointer<Encoding.CodeUnit>?,
145145
as encoding: Encoding.Type,
146146
repairingInvalidCodeUnits isRepairing: Bool = true

stdlib/public/core/CTypes.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ extension OpaquePointer: Hashable {
189189
}
190190
}
191191

192-
extension OpaquePointer : CustomDebugStringConvertible {
192+
extension OpaquePointer: CustomDebugStringConvertible {
193193
/// A textual representation of the pointer, suitable for debugging.
194194
public var debugDescription: String {
195195
return _rawPointerToString(_rawValue)
@@ -246,7 +246,7 @@ public struct CVaListPointer {
246246
}
247247
}
248248

249-
extension CVaListPointer : CustomDebugStringConvertible {
249+
extension CVaListPointer: CustomDebugStringConvertible {
250250
public var debugDescription: String {
251251
return "(\(_value.__stack.debugDescription), " +
252252
"\(_value.__gr_top.debugDescription), " +
@@ -270,7 +270,7 @@ public struct CVaListPointer {
270270
}
271271
}
272272

273-
extension CVaListPointer : CustomDebugStringConvertible {
273+
extension CVaListPointer: CustomDebugStringConvertible {
274274
/// A textual representation of the pointer, suitable for debugging.
275275
public var debugDescription: String {
276276
return _value.debugDescription

stdlib/public/core/Character.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -185,16 +185,16 @@ extension Character :
185185
}
186186
}
187187

188-
extension Character : CustomStringConvertible {
188+
extension Character: CustomStringConvertible {
189189
@inlinable
190190
public var description: String {
191191
return _str
192192
}
193193
}
194194

195-
extension Character : LosslessStringConvertible { }
195+
extension Character: LosslessStringConvertible { }
196196

197-
extension Character : CustomDebugStringConvertible {
197+
extension Character: CustomDebugStringConvertible {
198198
/// A textual representation of the character, suitable for debugging.
199199
public var debugDescription: String {
200200
return _str.debugDescription
@@ -211,15 +211,15 @@ extension String {
211211
}
212212
}
213213

214-
extension Character : Equatable {
214+
extension Character: Equatable {
215215
@inlinable @inline(__always)
216216
@_effects(readonly)
217217
public static func == (lhs: Character, rhs: Character) -> Bool {
218218
return lhs._str == rhs._str
219219
}
220220
}
221221

222-
extension Character : Comparable {
222+
extension Character: Comparable {
223223
@inlinable @inline(__always)
224224
@_effects(readonly)
225225
public static func < (lhs: Character, rhs: Character) -> Bool {

0 commit comments

Comments
 (0)