Skip to content

Commit

Permalink
minor corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
proggeramlug committed Apr 25, 2018
1 parent af9917d commit bf22048
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions Sources/Routing/Register/PathComponent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public enum PathComponent: ExpressibleByStringLiteral {

/// Shortcut for accessing `PathComponent.anything`.
public let any: PathComponent = .anything
/// Shortcut for accessing `PathComponent.catchall`.
public let all: PathComponent = .catchall


Expand Down
6 changes: 3 additions & 3 deletions Sources/Routing/Routing/RouterNode.swift
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ final class RouterNode<Output> {
return node
case .anything:
let node: RouterNode<Output>
if (self.anything == nil) {
if let anything = self.anything {
node = anything
} else {
node = RouterNode<Output>(value: Data([.colon]))
self.anything = node
} else {
node = self.anything!
}
return node
}
Expand Down

0 comments on commit bf22048

Please sign in to comment.