-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update ReactiveSwift to 2.0 #86
Conversation
Looks like this is due to ReactiveCocoa/ReactiveSwift#346. |
// over `init(_ action: @escaping () -> Value)`. | ||
let producer: SignalProducer<Any, Error> = SignalProducer { () -> Result<Any, Error> in | ||
return JSONSerialization.deserializeJSON(data).mapError { Error.jsonDeserializationError($0.error) } | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let producer: SignalProducer<Any, Error> = SignalProducer {
return JSONSerialization.deserializeJSON(data).mapError { Error.jsonDeserializationError($0.error) }
}
is not sufficient because Result<Any, Error>
itself is treated as Any
, so init(_ action: @escaping () -> Value)
is still used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should remove the () -> Value
initializer—or rename it to be a static func. 😕
It is the |
Yes, I've fixed the description just before your comment. 😉 |
Thanks for this! 🤘 |
No description provided.