You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be convenient to have a version of the parse func that took in Data instead of String, as the conversion of Data to String involves transiting an Optional<String> function (String(data: encoding:)). This maybe looks superficially like not an inconvenience, but in practice it means I have to make my own error type in order to propagate failures at this step. If SwiftSoup did it and implemented the error type, it would improve ergonomics.
The function signature might be something like this:
func parse(data:Data)throws->Document
The text was updated successfully, but these errors were encountered:
It would be convenient to have a version of the parse func that took in Data instead of String, as the conversion of Data to String involves transiting an
Optional<String>
function (String(data: encoding:)
). This maybe looks superficially like not an inconvenience, but in practice it means I have to make my own error type in order to propagate failures at this step. If SwiftSoup did it and implemented the error type, it would improve ergonomics.The function signature might be something like this:
The text was updated successfully, but these errors were encountered: