From 0d63aa1d431ccfe6f5565af1dcef20696ba7298a Mon Sep 17 00:00:00 2001 From: Tommi Reiman Date: Tue, 7 Nov 2017 22:56:58 +0200 Subject: [PATCH] Cleanup arguments --- perf-test/clj/reitit/trie.cljc | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/perf-test/clj/reitit/trie.cljc b/perf-test/clj/reitit/trie.cljc index 2fd5e49d..6cd0a5e8 100644 --- a/perf-test/clj/reitit/trie.cljc +++ b/perf-test/clj/reitit/trie.cljc @@ -31,12 +31,12 @@ (update-segment [this subs lcs]) (set-data [this data]) (add-child [this key child]) - (insert-child [this key path-spec o])) + (insert-child [this key path-spec data])) (extend-protocol Node nil (lookup [_ _ _]) - (get-segment [this])) + (get-segment [_])) (defrecord Match [data params]) @@ -46,7 +46,7 @@ children' (impl/fast-map children)] (reify Node - (lookup [this path params] + (lookup [_ path params] (let [i (.indexOf ^String path "/")] (if (pos? i) (let [value (subs path 0 i)] @@ -57,21 +57,21 @@ (lookup ?wild path' params) (lookup ?catch path' params)))) (->Match data (assoc params param path))))) - (get-segment [this] + (get-segment [_] segment) - (set-data [this data] + (set-data [_ data] (wild-node segment param children data)) - (add-child [this key child] + (add-child [_ key child] (wild-node segment param (assoc children key child) data)) - (insert-child [this key path-spec o] - (wild-node segment param (update children key insert path-spec o) data))))) + (insert-child [_ key path-spec child-data] + (wild-node segment param (update children key insert path-spec child-data) data))))) (defn catch-all-node [segment children param data] (reify Node - (lookup [this path params] + (lookup [_ path params] (->Match data (assoc params param path))) - (get-segment [this] + (get-segment [_] segment))) (defn static-node [^String segment children data] @@ -81,7 +81,7 @@ children' (impl/fast-map children)] (reify Node - (lookup [this path params] + (lookup [_ path params] (if (.equals segment path) (->Match data params) (let [p (if (>= (count path) size) (subs path 0 size))] @@ -91,15 +91,15 @@ (or (lookup child path params) (lookup ?wild path params) (lookup ?catch path params))))))) - (get-segment [this] + (get-segment [_] segment) - (update-segment [this subs lcs] + (update-segment [_ subs lcs] (static-node (subs segment lcs) children data)) - (set-data [this data] + (set-data [_ data] (static-node segment children data)) - (add-child [this key child] + (add-child [_ key child] (static-node segment (assoc children key child) data)) - (insert-child [this key path-spec child-data] + (insert-child [_ key path-spec child-data] (static-node segment (update children key insert path-spec child-data) data))))) (defn- wild? [s]