                         }
 
                         let topicPointer = UnsafeBufferPointer(start: messageBuffer + 2, count: topicLength)
-                        guard let topic = String(bytes: topicPointer, encoding: String.Encoding.utf8) else {
+                        guard let topic = String(bytes: topicPointer, encoding: .utf8) else {
                             messageParserState = .decodingHeader
                             break
                         }

        ]

        var messageBytes = headerBytes + encodeUTF8Length(client) + [UInt8](client.utf8)
        if let username = self.username {
            messageBytes += (encodeUTF8Length(username) + [UInt8](username.utf8))
        }
        if let password = self.password {
            messageBytes += (encodeUTF8Length(password) + [UInt8](password.utf8))
        }
        outputStream?.write(messageBytes, maxLength: messageBytes.count)
    }


                        let pointer = UnsafeBufferPointer(start: messageBuffer + topicLength + 2,
                                                          count: byteCount - topicLength - 2)

                        if let closure = receivingMessage, let message = String(bytes: pointer, encoding: .utf8) {
                            closure(topic, message)
                        }

