Skip to content

Commit 8579009

Browse files
committed
Merge branch 'release/1.2.0'
2 parents 794ce5f + fb74941 commit 8579009

File tree

16 files changed

+44
-33
lines changed

16 files changed

+44
-33
lines changed

.swiftlint.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ excluded:
66
disabled_rules:
77
- nesting
88
- redundant_optional_initialization
9+
- inert_defer

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
BSD 3-Clause License
22

3-
Copyright (c) 2017, Digipolitan
3+
Copyright (c) 2019, Digipolitan
44
All rights reserved.
55

66
Redistribution and use in source and binary forms, with or without

Package.resolved

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:4.0
1+
// swift-tools-version:4.2
22
// The swift-tools-version declares the minimum version of Swift required to build this package.
33

44
import PackageDescription
@@ -11,7 +11,7 @@ let package = Package(
1111
targets: ["PolymorphCore"])
1212
],
1313
dependencies: [
14-
.package(url: "https://github.com/Digipolitan/string-case-swift.git", from: "1.0.0")
14+
.package(url: "https://github.com/Digipolitan/string-case-swift.git", from: "1.1.0")
1515
],
1616
targets: [
1717
.target(

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PolymorphCore
22
=================================
33

4-
[![Swift Version](https://img.shields.io/badge/swift-4.0-orange.svg?style=flat)](https://developer.apple.com/swift/)
4+
[![Swift Version](https://img.shields.io/badge/swift-4.2-orange.svg?style=flat)](https://developer.apple.com/swift/)
55
[![Swift Package Manager](https://rawgit.com/jlyonsmith/artwork/master/SwiftPackageManager/swiftpackagemanager-compatible.svg)](https://swift.org/package-manager/)
66
[![Twitter](https://img.shields.io/badge/[email protected]?style=flat)](http://twitter.com/Digipolitan)
77

Sources/PolymorphCore/Class.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,8 @@ public class Class: Object, Documentable, Packageable {
142142

143143
extension Class: Hashable {
144144

145-
public var hashValue: Int {
146-
return self.id.hashValue
145+
public func hash(into hasher: inout Hasher) {
146+
hasher.combine(self.id)
147147
}
148148

149149
public static func == (lhs: Class, rhs: Class) -> Bool {

Sources/PolymorphCore/Enum.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ public class Enum: Object, Documentable, Packageable {
7979
}
8080

8181
public func addValue(_ value: Value) -> Bool {
82-
for v in self.values {
83-
guard v.name != value.name else {
82+
for val in self.values {
83+
guard val.name != value.name else {
8484
return false
8585
}
8686
}
@@ -91,8 +91,8 @@ public class Enum: Object, Documentable, Packageable {
9191

9292
extension Enum: Hashable {
9393

94-
public var hashValue: Int {
95-
return self.id.hashValue
94+
public func hash(into hasher: inout Hasher) {
95+
hasher.combine(self.id)
9696
}
9797

9898
public static func == (lhs: Enum, rhs: Enum) -> Bool {

Sources/PolymorphCore/External.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ public class External: Object, Documentable, Packageable {
6868

6969
extension External: Hashable {
7070

71-
public var hashValue: Int {
72-
return self.id.hashValue
71+
public func hash(into hasher: inout Hasher) {
72+
hasher.combine(self.id)
7373
}
7474

7575
public static func == (lhs: External, rhs: External) -> Bool {

Sources/PolymorphCore/Models.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@ public class Models: Documentable, Codable {
5555
}
5656

5757
public func findObject(name: String) -> Object? {
58-
if let c = self.findClass(name: name) {
59-
return c
58+
if let clazz = self.findClass(name: name) {
59+
return clazz
6060
}
61-
if let e = self.findEnum(name: name) {
62-
return e
61+
if let enu = self.findEnum(name: name) {
62+
return enu
6363
}
6464
return self.findExternal(name: name)
6565
}

Sources/PolymorphCore/Native.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ public class Native: Member {
7777

7878
extension Native: Hashable {
7979

80-
public var hashValue: Int {
81-
return self.name.hashValue
80+
public func hash(into hasher: inout Hasher) {
81+
hasher.combine(self.name)
8282
}
8383

8484
public static func == (lhs: Native, rhs: Native) -> Bool {

0 commit comments

Comments
 (0)