diff --git a/Cartfile b/Cartfile index e523d1a..220fa84 100644 --- a/Cartfile +++ b/Cartfile @@ -1 +1 @@ -github "antitypical/Result" ~> 1.0.0 +github "antitypical/Result" ~> 2.0.0 diff --git a/Cartfile.resolved b/Cartfile.resolved index 41b9fcd..4c66a71 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,2 +1,2 @@ -github "Alamofire/Alamofire" "3.2.1" -github "antitypical/Result" "1.0.2" +github "Alamofire/Alamofire" "3.3.0" +github "antitypical/Result" "2.0.0" diff --git a/Carthage/Checkouts/Alamofire b/Carthage/Checkouts/Alamofire index 5b6155c..bf208d0 160000 --- a/Carthage/Checkouts/Alamofire +++ b/Carthage/Checkouts/Alamofire @@ -1 +1 @@ -Subproject commit 5b6155ca2d3b584b5f0360068a02f978950dd18c +Subproject commit bf208d0c6d633f244a398f5580f5a141bab128b1 diff --git a/Carthage/Checkouts/Result b/Carthage/Checkouts/Result index 382f933..5dec9cf 160000 --- a/Carthage/Checkouts/Result +++ b/Carthage/Checkouts/Result @@ -1 +1 @@ -Subproject commit 382f9339404d24f632a5f98453c1e08a5ea55904 +Subproject commit 5dec9cf225d5fa3b0602679fb2638e40191da46b diff --git a/Example/SingleRequestViewController.swift b/Example/SingleRequestViewController.swift index b3c271f..621615e 100644 --- a/Example/SingleRequestViewController.swift +++ b/Example/SingleRequestViewController.swift @@ -14,7 +14,11 @@ public class StringIdentifierGenerator: RequestIdentifierGenerator { private var currentIdentifier = 1 public func next() -> RequestIdentifier { - return .StringIdentifier("id\(currentIdentifier++)") + defer { + currentIdentifier += 1 + } + + return .StringIdentifier("id\(currentIdentifier)") } } diff --git a/JSONRPCKit/NumberIdentifierGenerator.swift b/JSONRPCKit/NumberIdentifierGenerator.swift index da380ce..2ba5526 100644 --- a/JSONRPCKit/NumberIdentifierGenerator.swift +++ b/JSONRPCKit/NumberIdentifierGenerator.swift @@ -13,6 +13,10 @@ public class NumberIdentifierGenerator: RequestIdentifierGenerator { private var currentIdentifier = 1 public func next() -> RequestIdentifier { - return .NumberIdentifier(currentIdentifier++) + defer { + currentIdentifier += 1 + } + + return .NumberIdentifier(currentIdentifier) } } diff --git a/JSONRPCKit/RequestType.swift b/JSONRPCKit/RequestType.swift index c5c88eb..10aa7bf 100644 --- a/JSONRPCKit/RequestType.swift +++ b/JSONRPCKit/RequestType.swift @@ -9,7 +9,7 @@ import Foundation public protocol RequestType { - typealias Response + associatedtype Response var method: String { get }