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 <seabass-labrax@gmx.com>
This commit is contained in:
parent
0abd793fe7
commit
fecd09c656
|
@ -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]
|
||||
|
|
Loading…
Reference in New Issue