Clean up SocketPacket methods a bit

This commit is contained in:
Erik 2017-07-04 08:09:20 -04:00
parent 6b4dfd578f
commit 1a42580826
No known key found for this signature in database
GPG Key ID: 4930B7C5FBC1A69D

View File

@ -161,10 +161,9 @@ extension SocketPacket {
static func packetFromEmit(_ items: [Any], id: Int, nsp: String, ack: Bool) -> SocketPacket {
let (parsedData, binary) = deconstructData(items)
let packet = SocketPacket(type: findType(binary.count, ack: ack), data: parsedData,
id: id, nsp: nsp, binary: binary)
return packet
return SocketPacket(type: findType(binary.count, ack: ack), data: parsedData, id: id, nsp: nsp,
binary: binary)
}
}