Skip to content

Commit

Permalink
IFn implements runnable already
Browse files Browse the repository at this point in the history
  • Loading branch information
Weathercold committed Jan 22, 2023
1 parent 871faf3 commit 0f03a32
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .idea/extra-logging.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/clojure/logging/core/settings.clj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[log-handler :as log-h]
[setting :refer [set-setting]]
[translating :as transl])
(logging.util [lambdas :refer [cons1 runnable s-proc]]
(logging.util [lambdas :refer [cons1 s-proc]]
[log :as log]))
(:import (arc Core Events)
(arc.util Log Log$LogLevel)
Expand Down Expand Up @@ -76,4 +76,4 @@
(cons1 (fn [_]
(doto (.-settings Vars/ui)
(.addCategory "@extra-logging.displayname" Icon/wrench (cons1 register))
(.hidden (runnable refresh!))))))
(.hidden refresh!)))))
9 changes: 0 additions & 9 deletions src/clojure/logging/util/lambdas.clj
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,6 @@
(get [_ a] (f a))))

;; endregion

(defn runnable ^Runnable [f]
(reify Runnable
(run [_] (f))))

;; region Consumers

(defn cons1 ^Cons [f]
Expand Down Expand Up @@ -93,10 +88,6 @@
;; endregion

;; Experimental
(defmacro defrunnable [& body]
`(reify Runnable
(run [_] ~@body)))

(defmacro defcons [& body]
`(reify Cons
(get [a] ~@body)))

0 comments on commit 0f03a32

Please sign in to comment.