From 85ee9cf5c3d2e24da4f1fe5333dc310dc91c15b3 Mon Sep 17 00:00:00 2001 From: Tristan Labelle Date: Wed, 13 Nov 2024 05:58:12 -0500 Subject: [PATCH] Use .reduce --- Sources/WebDriver/Keys.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/WebDriver/Keys.swift b/Sources/WebDriver/Keys.swift index 6bd787a..b57e5d5 100644 --- a/Sources/WebDriver/Keys.swift +++ b/Sources/WebDriver/Keys.swift @@ -7,7 +7,7 @@ public struct Keys: RawRepresentable { /// Concatenates multiple key sequences into a single one. public static func sequence(_ keys: [Self]) -> Self { - Self(rawValue: keys.map(\.rawValue).joined()) + Self(rawValue: keys.reduce("") { $0 + $1.rawValue }) } /// Concatenates multiple key sequences into a single one.