Skip to content

Commit ae693f7

Browse files
committed
swift 5 warning fix
1 parent 8e13fed commit ae693f7

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

Sources/MySQL/Connection/MySQLColumn.swift

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
11
/// Represents a MySQL column.
22
public struct MySQLColumn: Hashable {
3-
/// See `Hashable.hashValue`
3+
// #if compiler(>=4.2)
4+
#if swift(>=4.1.50)
5+
/// See `Hashable`.
6+
public func hash(into hasher: inout Hasher) {
7+
hasher.combine(self._hashValue)
8+
}
9+
#else
10+
/// See `Hashable`.
411
public var hashValue: Int {
12+
return self._hashValue
13+
}
14+
#endif
15+
16+
private var _hashValue: Int {
517
return (table?.hashValue ?? 0) &+ name.hashValue
618
}
719

0 commit comments

Comments
 (0)