Merge pull request #44 from jstepien/enumeration-seq

Simplify load-plugins with enumeration-seq
This commit is contained in:
Dmitri Sotnikov 2015-09-20 17:55:32 -04:00
commit ca18cdf916

View file

@ -12,7 +12,5 @@
(defn load-plugins []
(let [plugins (.getResources (ClassLoader/getSystemClassLoader) "plugin.edn")]
(loop []
(load-plugin (. ^java.net.URL (. plugins nextElement) openStream))
(when (.hasMoreElements plugins)
(recur)))))
(doseq [plugin (enumeration-seq plugins)]
(load-plugin (. ^java.net.URL plugin openStream)))))