Skip to content

Commit

Permalink
Merge pull request #50 from giginet/avoid-warnings
Browse files Browse the repository at this point in the history
Avoid warnings on the latest Xcode
  • Loading branch information
giginet committed Feb 19, 2024
2 parents c102366 + 43b729f commit 1f5752c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Sources/Crossroad/Validator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ protocol ValidationRule {

extension Router {
private struct UnknownLinkSourceRule: ValidationRule {
func validate<UserInfo>(for router: Router<UserInfo>) throws {
func validate<U>(for router: Router<U>) throws {
for route in router.routes {
guard case let .only(acceptSources) = route.acceptPolicy else {
continue
Expand All @@ -20,7 +20,7 @@ extension Router {
}

private struct DuplicatedRouteRule: ValidationRule {
func validate<UserInfo>(for router: Router<UserInfo>) throws {
func validate<U>(for router: Router<U>) throws {
for route in router.routes {
let acceptSources: Set<LinkSource>
switch route.acceptPolicy {
Expand All @@ -46,7 +46,7 @@ extension Router {
}

private struct InvalidLinkSourceRule: ValidationRule {
func validate<UserInfo>(for router: Router<UserInfo>) throws {
func validate<U>(for router: Router<U>) throws {
for route in router.routes {
guard let patternLinkSource = route.pattern.linkSource else {
continue
Expand All @@ -70,7 +70,7 @@ extension Router {
}

private struct InvalidUniversalLinkSourceRule: ValidationRule {
func validate<UserInfo>(for router: Router<UserInfo>) throws {
func validate<U>(for router: Router<U>) throws {
for linkSource in router.linkSources {
switch linkSource {
case .customURLScheme:
Expand Down Expand Up @@ -101,7 +101,7 @@ extension Router {
"mailto",
]

func validate<UserInfo>(for router: Router<UserInfo>) throws {
func validate<U>(for router: Router<U>) throws {
for linkSource in router.linkSources {
switch linkSource {
case .customURLScheme(let scheme):
Expand Down

0 comments on commit 1f5752c

Please sign in to comment.