Skip to content

Commit

Permalink
Make Parameters.allNames more compatible (#123)
Browse files Browse the repository at this point in the history
  • Loading branch information
gwynne authored Mar 28, 2023
1 parent bdc9c25 commit 611bc45
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions Sources/RoutingKit/Parameters.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,8 @@ public struct Parameters {
private var catchall: Catchall
public let logger: Logger

#if swift(>=5.7) // SE-0346
/// Return a list of all parameter names which were captured. Does not include values listed in the catchall.
public var allNames: some Collection<String> { self.values.keys }
#else
/// Return a list of all parameter names which were captured. Does not include values listed in the catchall.
public var allNames: AnyCollection<String> { .init(self.values.keys) }
#endif
public var allNames: Set<String> { .init(self.values.keys) }

/// Creates a new `Parameters`.
///
Expand Down

0 comments on commit 611bc45

Please sign in to comment.