Skip to content

Commit

Permalink
Use .reduce
Browse files Browse the repository at this point in the history
  • Loading branch information
tristanlabelle committed Nov 13, 2024
1 parent be26f2e commit 85ee9cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/WebDriver/Keys.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 85ee9cf

Please sign in to comment.