Skip to content

Commit 9411a08

Browse files
change var to let
1 parent 2771eb5 commit 9411a08

15 files changed

+0
-70
lines changed

stdlib/public/Darwin/Foundation/AffineTransform.swift

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -275,15 +275,6 @@ public struct AffineTransform : ReferenceConvertible, Hashable, CustomStringConv
275275
newSize.height = (m12 * size.width) + (m22 * size.height)
276276
return newSize
277277
}
278-
279-
public func hash(into hasher: inout Hasher) {
280-
hasher.combine(m11)
281-
hasher.combine(m12)
282-
hasher.combine(m21)
283-
hasher.combine(m22)
284-
hasher.combine(tX)
285-
hasher.combine(tY)
286-
}
287278

288279
public var hashValue : Int {
289280
return Int(m11 + m12 + m21 + m22 + tX + tY)

stdlib/public/Darwin/Foundation/Calendar.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -899,10 +899,6 @@ public struct Calendar : Hashable, Equatable, ReferenceConvertible, _MutableBoxi
899899

900900
// MARK: -
901901

902-
public func hash(into hasher: inout Hasher) {
903-
hasher.combine(_handle.map { $0 })
904-
}
905-
906902
public var hashValue : Int {
907903
// We implement hash ourselves, because we need to make sure autoupdating calendars have the same hash
908904
if _autoupdating {

stdlib/public/Darwin/Foundation/Date.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,6 @@ public struct Date : ReferenceConvertible, Comparable, Equatable {
141141
The distant past is in terms of centuries.
142142
*/
143143
public static let distantPast = Date(timeIntervalSinceReferenceDate: -63114076800.0)
144-
145-
public func hash(into hasher: inout Hasher) {
146-
hasher.combine(_time)
147-
}
148144

149145
public var hashValue: Int {
150146
if #available(macOS 10.12, iOS 10.0, *) {

stdlib/public/Darwin/Foundation/DateComponents.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -262,10 +262,6 @@ public struct DateComponents : ReferenceConvertible, Hashable, Equatable, _Mutab
262262
}
263263

264264
// MARK: -
265-
266-
public func hash(into hasher: inout Hasher) {
267-
hasher.combine(_handle.map { $0 })
268-
}
269265

270266
public var hashValue : Int {
271267
return _handle.map { $0.hash }

stdlib/public/Darwin/Foundation/DateInterval.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,10 +155,6 @@ public struct DateInterval : ReferenceConvertible, Comparable, Hashable, Codable
155155
return false
156156
}
157157

158-
public func hash(into hasher: inout Hasher) {
159-
hasher.combine(start)
160-
}
161-
162158
public var hashValue: Int {
163159
var buf: (UInt, UInt) = (UInt(start.timeIntervalSinceReferenceDate), UInt(end.timeIntervalSinceReferenceDate))
164160
return withUnsafeMutablePointer(to: &buf) {

stdlib/public/Darwin/Foundation/Decimal.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,10 +177,6 @@ extension Decimal : Hashable, Comparable {
177177
return _isNegative != 0 ? -d : d
178178
}
179179

180-
public func hash(into hasher: inout Hasher) {
181-
hasher.combine(doubleValue)
182-
}
183-
184180
public var hashValue: Int {
185181
return Int(bitPattern: __CFHashDouble(doubleValue))
186182
}

stdlib/public/Darwin/Foundation/IndexSet.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,6 @@ public struct IndexSet : ReferenceConvertible, Equatable, BidirectionalCollectio
136136
public init() {
137137
_handle = _MutablePairHandle(NSIndexSet(), copying: false)
138138
}
139-
140-
public func hash(into hasher: inout Hasher) {
141-
hasher.combine(_handle.map { $0.hash })
142-
}
143139

144140
public var hashValue: Int {
145141
return _handle.map { $0.hash }

stdlib/public/Darwin/Foundation/Locale.swift

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -404,11 +404,6 @@ public struct Locale : Hashable, Equatable, ReferenceConvertible {
404404

405405
// MARK: -
406406
//
407-
408-
public func hash(into hasher: inout Hasher) {
409-
hasher.combine(_wrapped)
410-
hasher.combine(_autoupdating)
411-
}
412407

413408
public var hashValue : Int {
414409
if _autoupdating {

stdlib/public/Darwin/Foundation/Measurement.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,6 @@ public struct Measurement<UnitType : Unit> : ReferenceConvertible, Comparable, E
3636
self.unit = unit
3737
}
3838

39-
public func hash(into hasher: inout Hasher) {
40-
hasher.combine(value)
41-
}
42-
4339
public var hashValue: Int {
4440
return Int(bitPattern: __CFHashDouble(value))
4541
}

stdlib/public/Darwin/Foundation/Notification.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,6 @@ public struct Notification : ReferenceConvertible, Equatable, Hashable {
3939
self.userInfo = userInfo
4040
}
4141

42-
public func hash(into hasher: inout Hasher) {
43-
hasher.combine(name)
44-
}
45-
4642
public var hashValue: Int {
4743
return name.rawValue.hash
4844
}

stdlib/public/Darwin/Foundation/PersonNameComponents.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,6 @@ public struct PersonNameComponents : ReferenceConvertible, Hashable, Equatable,
7070
get { return _handle.map { $0.phoneticRepresentation } }
7171
set { _applyMutation { $0.phoneticRepresentation = newValue } }
7272
}
73-
74-
public func hash(into hasher: inout Hasher) {
75-
hasher.combine(_handle.map { $0 })
76-
}
7773

7874
public var hashValue : Int {
7975
return _handle.map { $0.hash }

stdlib/public/Darwin/Foundation/TimeZone.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -195,10 +195,6 @@ public struct TimeZone : Hashable, Equatable, ReferenceConvertible {
195195
}
196196

197197
// MARK: -
198-
199-
public func hash(into hasher: inout Hasher) {
200-
hasher.combine(_wrapped)
201-
}
202198

203199
public var hashValue : Int {
204200
if _autoupdating {

stdlib/public/Darwin/Foundation/URL.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -621,10 +621,6 @@ public struct URL : ReferenceConvertible, Equatable {
621621
public init(fileURLWithFileSystemRepresentation path: UnsafePointer<Int8>, isDirectory: Bool, relativeTo baseURL: __shared URL?) {
622622
_url = URL._converted(from: NSURL(fileURLWithFileSystemRepresentation: path, isDirectory: isDirectory, relativeTo: baseURL))
623623
}
624-
625-
public func hash(into hasher: inout Hasher) {
626-
hasher.combine(_url.hash)
627-
}
628624

629625
public var hashValue: Int {
630626
return _url.hash

stdlib/public/Darwin/Foundation/URLComponents.swift

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -291,10 +291,6 @@ public struct URLComponents : ReferenceConvertible, Hashable, Equatable, _Mutabl
291291
get { return _handle.map { $0.percentEncodedQueryItems } }
292292
set { _applyMutation { $0.percentEncodedQueryItems = newValue } }
293293
}
294-
295-
public func hash(into hasher: inout Hasher) {
296-
hasher.combine(_handle.map { $0.hash })
297-
}
298294

299295
public var hashValue: Int {
300296
return _handle.map { $0.hash }
@@ -407,10 +403,6 @@ public struct URLQueryItem : ReferenceConvertible, Hashable, Equatable {
407403
get { return _queryItem.value }
408404
set { _queryItem = NSURLQueryItem(name: name, value: newValue) }
409405
}
410-
411-
public func hash(into hasher: inout Hasher) {
412-
hasher.combine(_queryItem.hash)
413-
}
414406

415407
public var hashValue: Int { return _queryItem.hash }
416408

stdlib/public/Darwin/Foundation/URLRequest.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -228,10 +228,6 @@ public struct URLRequest : ReferenceConvertible, Equatable, Hashable {
228228
_applyMutation { $0.httpShouldUsePipelining = newValue }
229229
}
230230
}
231-
232-
public func hash(into hasher: inout Hasher) {
233-
hasher.combine(_handle.map { $0.hashValue })
234-
}
235231

236232
public var hashValue: Int {
237233
return _handle.map { $0.hashValue }

0 commit comments

Comments
 (0)