Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tanner0101 committed Feb 4, 2016
1 parent 9783f79 commit be28c2f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Sources/NodeRouter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ class NodeRouter: RouterDriver {
Recurses the routing tree to return nodes for assigning
handlers and create child nodes where needed.
*/
func inflate(node: Node, var paths: [String]) -> Node {
func inflate(node: Node, paths: [String]) -> Node {
var paths = paths

if paths.count == 0 {
return node
}
Expand Down Expand Up @@ -67,7 +69,7 @@ class NodeRouter: RouterDriver {
func printNode(node: Node, depth: Int) {
for (key, node) in node.nodes {
var prefix = ""
for var i = 0; i < depth; i++ {
for _ in 0 ..< depth {
prefix += "\t"
}
print("\(prefix)\(key)")
Expand All @@ -87,7 +89,9 @@ class NodeRouter: RouterDriver {
}


private func search(node: Node, var paths: [String], request: Request) -> (Request -> Response)? {
private func search(node: Node, paths: [String], request: Request) -> (Request -> Response)? {
var paths = paths

if paths.count == 0 {
return node.handler
}
Expand Down

0 comments on commit be28c2f

Please sign in to comment.