From c557fa84780d27c53a31241dd791586917d08098 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20St=C4=99pie=C5=84?= Date: Sun, 20 Sep 2015 22:52:51 +0200 Subject: [PATCH] Simplify load-plugins with enumeration-seq --- src/cryogen_core/plugins.clj | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/cryogen_core/plugins.clj b/src/cryogen_core/plugins.clj index 3d2f197..e907745 100644 --- a/src/cryogen_core/plugins.clj +++ b/src/cryogen_core/plugins.clj @@ -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)))))