swift-redis icon indicating copy to clipboard operation
swift-redis copied to clipboard

Swift 2.2 Compatibility + PubSub

Open scottbyrns opened this issue 9 years ago • 2 comments

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.

scottbyrns avatar Mar 26 '16 02:03 scottbyrns

CI Build fails due to language version differences.

scottbyrns avatar Mar 26 '16 02:03 scottbyrns

This pull now includes resolution to #20 for synch calls to pubsub methods exposed from hiredis

scottbyrns avatar Mar 27 '16 03:03 scottbyrns