nmdias / FeedKit

An RSS, Atom and JSON Feed parser written in Swift
MIT License
1.19k stars 173 forks source link

Conform Feed and ParserError to Equatable #122

Closed marinofelipe closed 1 year ago

marinofelipe commented 4 years ago

Hey there 👋 , first of all thanks for your work!

I've been using FeedKit in a side project of mine and while I was creating unit tests for types that uses/wraps a FeedParser I though about potential minor improvements.. that's why I'm opening this PR. These are lightweight changes and there are no breaking changes derived from it. I hope to be contributing.

Changes

parser.parseAsync(queue: queue) { result in
   switch result {
      case let .success(feed): 
          // do something
      case let .failure(error):
         switch error {
             case .notFound: break
             case let .feedCDATABlockEncodingError(path): break
             case let .internalError(reason): break
         }
   }
}
nmdias commented 1 year ago

Thank you @marinofelipe