Skip to content

Commit

Permalink
Remove reflection warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
hlship committed Jun 25, 2023
1 parent 4dae3c4 commit 5b1511d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/clj_commons/ansi.clj
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
(vector? input)
(let [[first-element & inputs] input
{:keys [font width pad]} (extract-span-decl first-element)
{:keys [current *width tracking-width? buffer]} state
{:keys [current *width tracking-width? ^StringBuilder buffer]} state
_ (when (and width tracking-width?)
(throw (ex-info "can only track one span width at a time"
{:input input})))
Expand Down
4 changes: 2 additions & 2 deletions test/demo.clj
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@
;; 11 Feb 2016 - 553 µs (14 µs std dev) - Clojure 1.8
;; 13 Sep 2021 - 401 µs (16 µs std dev) - Clojure 1.11.1
;; 20 Jun 2023 - 713 µs (30 µs std dev) - Clojure 1.11.1, Corretto 17.0.7, M1
;; 21 Jun 2023 - 462 µs - Clojure 1.11.1, Corretto 17.0.7, M1
;;
;; 25 Jun 2023 - 507 µs - Clojure 1.11.1, Corretto 17.0.7, M1

(let [e (make-ex-info)]
(c/bench (e/format-exception e)))

Expand Down
3 changes: 3 additions & 0 deletions test/user.clj
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
(ns user)

(set! *warn-on-reflection* true)

0 comments on commit 5b1511d

Please sign in to comment.