Skip to content

Commit b26070c

Browse files
author
Nathan Marz
committed
remove unnecessary destructuring-reify
1 parent 71e7e21 commit b26070c

File tree

2 files changed

+2
-19
lines changed

2 files changed

+2
-19
lines changed

src/clj/backtype/storm/clojure.clj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
(defmacro bolt [& body]
4545
(let [[bolt-fns other-fns] (split-with #(not (symbol? %)) body)
4646
fns (normalize-fns bolt-fns)]
47-
`(destructuring-reify IBolt
47+
`(reify IBolt
4848
~@fns
4949
~@other-fns)))
5050

@@ -55,7 +55,7 @@
5555
(defmacro spout [& body]
5656
(let [[spout-fns other-fns] (split-with #(not (symbol? %)) body)
5757
fns (normalize-fns spout-fns)]
58-
`(destructuring-reify ISpout
58+
`(reify ISpout
5959
~@fns
6060
~@other-fns)))
6161

src/clj/backtype/storm/util.clj

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -591,20 +591,3 @@
591591
(let [entries (->> zipfile (ZipFile.) .entries enumeration-seq (map (memfn getName)))]
592592
(some? #(.startsWith % (str target "/")) entries)
593593
))
594-
595-
(defn destructure-method [[name args & body]]
596-
(let [[newargs subs] (reduce (fn [[args submap] val]
597-
(if (symbol? val)
598-
[(conj args val) submap]
599-
(let [newsym (gensym)]
600-
[(conj args newsym) (assoc submap newsym val)]
601-
)))
602-
[[] {}]
603-
args)
604-
let-bindings (forcat [[sym val] subs] [val sym])]
605-
`(~name ~newargs (let [~@let-bindings] ~@body))
606-
))
607-
608-
(defmacro destructuring-reify [& args]
609-
(let [args (map #(if (list? %) (destructure-method %) %) args)]
610-
`(reify ~@args )))

0 commit comments

Comments
 (0)