From fecd09c65624afef5565d7120421891a948a8643 Mon Sep 17 00:00:00 2001 From: Sebastian Crane Date: Tue, 22 Mar 2022 22:51:59 +0000 Subject: [PATCH] Remove unnecessary system/system function A nil value acts as an empty map wherever a map value is expected. For this reason, this commit removes the system/system function (which returns an empty map), since a call to it can safely be replaced with a nil value. Signed-off-by: Sebastian Crane --- src/system.clj | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/system.clj b/src/system.clj index e317eea..b8cee5e 100644 --- a/src/system.clj +++ b/src/system.clj @@ -34,11 +34,6 @@ (yaml/parse-stream datafile)) (catch Exception e nil))) -(defn system [] - {:config nil - :state nil - :irc nil}) - (defn start [system] (let [config (load-config "config.yaml") state (atom (load-state (:data-file config))) @@ -58,7 +53,7 @@ (defn restart [system-var] (do (alter-var-root system-var stop) - (alter-var-root system-var (constantly system)) + (alter-var-root system-var (constantly nil)) (alter-var-root system-var start))) (defn -main [& args]