From 89dbe98126e5647f2692d363da753558ca36cf66 Mon Sep 17 00:00:00 2001 From: Blake Barrett Date: Thu, 14 Dec 2017 11:41:47 -0800 Subject: [PATCH 1/2] Fixes: https://github.com/daltoniam/Starscream/issues/442 Should build again under Swift 3.2 --- Sources/WebSocket.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Sources/WebSocket.swift b/Sources/WebSocket.swift index 3f7ff816..db800dcd 100644 --- a/Sources/WebSocket.swift +++ b/Sources/WebSocket.swift @@ -1342,3 +1342,9 @@ private extension UnsafeBufferPointer { } private let emptyBuffer = UnsafeBufferPointer(start: nil, count: 0) + +extension String { + var count: Int { + return self.characters.count + } +} From 8eea3ecd356bee8d97ce4d8c2483f412e5ded521 Mon Sep 17 00:00:00 2001 From: Blake Barrett Date: Thu, 14 Dec 2017 11:51:24 -0800 Subject: [PATCH 2/2] Rescoping to fileprivate. This doesn't need to effect anyone else' code. --- Sources/WebSocket.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/WebSocket.swift b/Sources/WebSocket.swift index db800dcd..fe7dcb72 100644 --- a/Sources/WebSocket.swift +++ b/Sources/WebSocket.swift @@ -1343,7 +1343,7 @@ private extension UnsafeBufferPointer { private let emptyBuffer = UnsafeBufferPointer(start: nil, count: 0) -extension String { +fileprivate extension String { var count: Int { return self.characters.count }