From 402600bb4e07bbae99b0e7ba83c75f5b17462585 Mon Sep 17 00:00:00 2001 From: Anass Bouassaba Date: Sat, 30 Nov 2024 16:35:45 +0100 Subject: [PATCH] chore: remove unused source file --- Sources/Helpers/Fake.swift | 44 -------------------------------------- 1 file changed, 44 deletions(-) delete mode 100644 Sources/Helpers/Fake.swift diff --git a/Sources/Helpers/Fake.swift b/Sources/Helpers/Fake.swift deleted file mode 100644 index 2c29014f..00000000 --- a/Sources/Helpers/Fake.swift +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2024 Anass Bouassaba. -// -// Use of this software is governed by the Business Source License -// included in the file LICENSE in the root of this repository. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the GNU Affero General Public License v3.0 only, included in the file -// AGPL-3.0-only in the root of this repository. - -import Foundation -import VoltaserveCore - -enum Fake { - static let serverError = VOErrorResponse( - code: .internalServerError, - status: 500, - message: "Lorem ipsum dolor sit amet, consectetur adipiscing elit.", - userMessage: "Lorem ipsum dolor sit amet, consectetur adipiscing elit.", - moreInfo: "http://voltaserve.com" - ) - - static func serverCall(_ code: @escaping (CheckedContinuation) -> Void) async throws -> T { - try await withCheckedThrowingContinuation { (continuation: CheckedContinuation) in - DispatchQueue.main.asyncAfter(deadline: .now() + 2.5) { - code(continuation) - } - } - } - - static func serverCall(_ code: @escaping (CheckedContinuation) -> Void) async throws { - try await withCheckedThrowingContinuation { (continuation: CheckedContinuation) in - DispatchQueue.main.asyncAfter(deadline: .now() + 2.5) { - code(continuation) - } - } - } -} - -extension String { - func lowercasedAndTrimmed() -> String { - lowercased().trimmingCharacters(in: .whitespaces) - } -}