Skip to content

Commit 275c873

Browse files
committed
remove mutable parameter
1 parent 2ccaa43 commit 275c873

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

Source/SocketIOClient.swift

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,17 +59,14 @@ public final class SocketIOClient: NSObject, SocketEngineClient {
5959
/**
6060
Type safe way to create a new SocketIOClient. opts can be omitted
6161
*/
62-
public init(var socketURL: String, options: Set<SocketIOClientOption> = []) {
62+
public init(socketURL: String, options: Set<SocketIOClientOption> = []) {
6363
self.options = options
6464

6565
if socketURL["https://"].matches().count != 0 {
6666
self.options.insertIgnore(.Secure(true))
6767
}
6868

69-
socketURL = socketURL["http://"] ~= ""
70-
socketURL = socketURL["https://"] ~= ""
71-
72-
self.socketURL = socketURL
69+
self.socketURL = socketURL["https?://"] ~= ""
7370

7471
for option in options ?? [] {
7572
switch option {

Source/SocketParser.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ class SocketParser {
6060
}
6161
}
6262

63+
/// Parses a messsage from the engine. Returning either a string error or a complete SocketPacket
6364
static func parseString(message: String) -> Either<String, SocketPacket> {
6465
var parser = SocketStringReader(message: message)
6566

0 commit comments

Comments
 (0)