swift-redis
swift-redis copied to clipboard
Swift 2.2 Compatibility + PubSub
I've updated the code to compile against swift 2.2. I found one challenge in doing so, string has no member flatMap. I looked at the implementation and it seems the aim of
`
-
return String.fromCString(UnsafePointer(b)).flatMap { s in -
if s == "" { return nil } else { return s } -
`}
was to return nil if the value was an empty string.
I did a comparison to see if the string was empty and returned nil in that case, if this understanding is incorrect, I'll take another pass if the details of the intent behind the code are explained.
CI Build fails due to language version differences.
This pull now includes resolution to #20 for synch calls to pubsub methods exposed from hiredis