From 614f97b6df9e4528e556b4fecdcee266d85981be Mon Sep 17 00:00:00 2001 From: Shinichiro Oba Date: Mon, 28 Mar 2016 15:58:20 +0900 Subject: [PATCH] support Swift 2.2 --- Cartfile | 2 +- Cartfile.resolved | 4 ++-- Carthage/Checkouts/Alamofire | 2 +- Carthage/Checkouts/Result | 2 +- Example/SingleRequestViewController.swift | 6 +++++- JSONRPCKit/NumberIdentifierGenerator.swift | 6 +++++- JSONRPCKit/RequestType.swift | 2 +- 7 files changed, 16 insertions(+), 8 deletions(-) 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 }