2
0

More than 5 years have passed since last update.

AlamofireとResultの併用方法 in Swift 3

Last updated at Posted at 2017-03-14

AlamofireとResultが併用できない理由は以下の記事を参照。
http://qiita.com/obi_yuta/items/ad386ba7b71c5102f1c3
上記記事に記載の

ResultResult.swift
import Result

struct ResultResult<T, Error : ErrorType> {
    typealias Result = Result<T, Error>
}

は、Swift 3では使えません。

ErrorTypeをErrorに直しても、以下のようにエラーが出ます。
Screen Shot 2017-03-14 at 16.49.31.png

以下で対応できます。

ResultResult.swift
import Result

typealias ResultResult<T, Error: Error> = Result<T, Error>
2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0