mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 01:20:12 +00:00
Fix various swiftlint and swiftformat warnings
This commit is contained in:
committed by
Stefan Ceriu
parent
2079bf40c6
commit
9f6fc1d42f
@@ -146,11 +146,10 @@ enum UITestsSignalling {
|
||||
let encoder = JSONEncoder()
|
||||
encoder.outputFormatting = .sortedKeys
|
||||
|
||||
guard let data = try? encoder.encode(self),
|
||||
let string = String(data: data, encoding: .utf8) else {
|
||||
guard let data = try? encoder.encode(self) else {
|
||||
return "unknown"
|
||||
}
|
||||
return string
|
||||
return String(decoding: data, as: UTF8.self)
|
||||
}
|
||||
|
||||
init?(rawValue: String) {
|
||||
@@ -175,7 +174,7 @@ enum UITestsSignalling {
|
||||
|
||||
/// Processes string data from the file and publishes its signal.
|
||||
private func processFileData(_ data: Data) {
|
||||
guard let rawMessage = String(data: data, encoding: .utf8) else { return }
|
||||
let rawMessage = String(decoding: data, as: UTF8.self)
|
||||
|
||||
guard let message = Message(rawValue: rawMessage),
|
||||
message.mode != mode // Filter out messages sent by this client.
|
||||
|
||||
Reference in New Issue
Block a user