diff --git a/Sources/XXClient/Functions/GetNotificationsReport.swift b/Sources/XXClient/Functions/GetNotificationsReport.swift index b545d663ee3562a785ea122ae9c723b326300f3a..7984285a8cfe5aea99284c7c62e26711f7b6c94c 100644 --- a/Sources/XXClient/Functions/GetNotificationsReport.swift +++ b/Sources/XXClient/Functions/GetNotificationsReport.swift @@ -14,23 +14,22 @@ public struct GetNotificationsReport { } extension GetNotificationsReport { - public static func live() -> GetNotificationsReport { - GetNotificationsReport { e2eId, notificationCSV, services in - var error: NSError? - let result = BindingsGetNotificationsReport( - e2eId, - notificationCSV, - try services.encode(), - &error - ) - if let error = error { - throw error - } - guard let result = result else { - fatalError("BindingsGetNotificationsReport returned nil without providing error") - } - return try NotificationReport.decode(result) + public static let live = GetNotificationsReport { + e2eId, notificationCSV, services in + var error: NSError? + let result = BindingsGetNotificationsReport( + e2eId, + notificationCSV, + try services.encode(), + &error + ) + if let error = error { + throw error } + guard let result = result else { + fatalError("BindingsGetNotificationsReport returned nil without providing error") + } + return try NotificationReport.decode(result) } }