characters is going to be deprecated

This commit is contained in:
Erik Little 2017-09-25 09:09:23 -04:00
parent 1421da2aab
commit 4d30b3c951
No known key found for this signature in database
GPG Key ID: 4930B7C5FBC1A69D
2 changed files with 3 additions and 3 deletions

View File

@ -517,13 +517,13 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
switch type {
case .message:
handleMessage(String(message.characters.dropFirst()))
handleMessage(String(message.dropFirst()))
case .noop:
handleNOOP()
case .pong:
handlePong(with: message)
case .open:
handleOpen(openData: String(message.characters.dropFirst()))
handleOpen(openData: String(message.dropFirst()))
case .close:
handleClose(message)
default:

View File

@ -184,7 +184,7 @@ extension SocketEnginePollable {
}
func parsePollingMessage(_ str: String) {
guard str.characters.count != 1 else { return }
guard str.count != 1 else { return }
DefaultSocketLogger.Logger.log("Got poll message: \(str)", type: "SocketEnginePolling")