Skip to content

Commit 5492827

Browse files
xwulorentey
authored andcommitted
[stdlib] Remove unnecessary type annotations in hashValue
1 parent c56882a commit 5492827

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

stdlib/public/core/Arrays.swift.gyb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2303,7 +2303,7 @@ extension ${Self} : Hashable where Element : Hashable {
23032303
@available(swift, introduced: 4.1)
23042304
public var hashValue: Int {
23052305
// FIXME(ABI)#177: <rdar://problem/18915294> Issue applies to Array too
2306-
var result: Int = 0
2306+
var result = 0
23072307
for element in self {
23082308
result = _combineHashValues(result, element.hashValue)
23092309
}

stdlib/public/core/Dictionary.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1452,7 +1452,7 @@ extension Dictionary: Hashable where Value: Hashable {
14521452
@available(swift, introduced: 4.1)
14531453
public var hashValue: Int {
14541454
// FIXME(ABI)#177: <rdar://problem/18915294> Issue applies to Dictionary too
1455-
var result: Int = 0
1455+
var result = 0
14561456
for (k, v) in self {
14571457
let combined = _combineHashValues(k.hashValue, v.hashValue)
14581458
result ^= _mixInt(combined)

stdlib/public/core/ExistentialCollection.swift.gyb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1264,7 +1264,7 @@ extension AnyCollection : Hashable where Element : Hashable {
12641264
@available(swift, introduced: 4.1)
12651265
public var hashValue: Int {
12661266
// FIXME(ABI)#177: <rdar://problem/18915294> Issue applies to AnyCollection too
1267-
var result: Int = 0
1267+
var result = 0
12681268
for element in self {
12691269
result = _combineHashValues(result, element.hashValue)
12701270
}

stdlib/public/core/Mirror.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -781,7 +781,7 @@ extension DictionaryLiteral: Hashable where Key: Hashable, Value: Hashable {
781781
@available(swift, introduced: 4.1)
782782
public var hashValue: Int {
783783
// FIXME(ABI)#177: <rdar://problem/18915294> Issue applies to DictionaryLiteral too
784-
var result: Int = 0
784+
var result = 0
785785
for element in self {
786786
let elementHashValue =
787787
_combineHashValues(element.key.hashValue, element.value.hashValue)

0 commit comments

Comments
 (0)