[英]Value of type 'Result<String>' has no member 'error' [Alamofire, Swift 5]
As Swift 5 introduced Result type, so I am getting numerous errors with Alamofire. 由于Swift 5引入了Result类型,因此我在Alamofire上遇到了很多错误。
Other Errors: 其他错误:
Enum case 'success' has no associated values
Member 'failure' in 'Result<T>' produces result of type 'Result<String>', but context expects 'Result<T>'
Any quick fix! 任何快速修复!
Change 更改
Result
to 至
Alamofire.Result
Or create a typealias
as, 或者创建一个
typealias
,
typealias AFResult = Alamofire.Result
and change Result
to AFResult
. 并将
Result
更改为AFResult
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.