From 867deb3bb29d8ebb630fdd3f005dffdec2c8285c Mon Sep 17 00:00:00 2001 From: Francesco Paolo Severino Date: Wed, 25 Sep 2024 22:53:48 +0200 Subject: [PATCH] Fix `.forEach` to `for-in` replacement --- Sources/Orders/OrdersServiceCustom.swift | 2 +- Sources/Passes/PassesServiceCustom.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/Orders/OrdersServiceCustom.swift b/Sources/Orders/OrdersServiceCustom.swift index 9e33505..a650869 100644 --- a/Sources/Orders/OrdersServiceCustom.swift +++ b/Sources/Orders/OrdersServiceCustom.swift @@ -380,7 +380,7 @@ extension OrdersServiceCustom { let paths = try FileManager.default.subpathsOfDirectory(atPath: root.path) for relativePath in paths { let file = URL(fileURLWithPath: relativePath, relativeTo: root) - guard !file.hasDirectoryPath else { return } + guard !file.hasDirectoryPath else { continue } let data = try Data(contentsOf: file) let hash = SHA256.hash(data: data) manifest[relativePath] = hash.map { "0\(String($0, radix: 16))".suffix(2) }.joined() diff --git a/Sources/Passes/PassesServiceCustom.swift b/Sources/Passes/PassesServiceCustom.swift index 9987fd7..334a990 100644 --- a/Sources/Passes/PassesServiceCustom.swift +++ b/Sources/Passes/PassesServiceCustom.swift @@ -490,7 +490,7 @@ extension PassesServiceCustom { let paths = try FileManager.default.subpathsOfDirectory(atPath: root.path) for relativePath in paths { let file = URL(fileURLWithPath: relativePath, relativeTo: root) - guard !file.hasDirectoryPath else { return } + guard !file.hasDirectoryPath else { continue } let data = try Data(contentsOf: file) let hash = Insecure.SHA1.hash(data: data) manifest[relativePath] = hash.map { "0\(String($0, radix: 16))".suffix(2) }.joined()