Browse files

Tidy up find-source-width.

  • Loading branch information...
1 parent 347f92d commit 2254905831e9e2c43dfa22c948120cec04ac7a10 @technomancy technomancy committed Jan 3, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/clj_stacktrace/repl.clj
View
8 src/clj_stacktrace/repl.clj
@@ -92,10 +92,10 @@
"Returns the width of the longest source-string among all trace elems of the
excp and its causes."
[excp]
- (let [this-source-width (utils/fence
- (sort
- (map #(.length ^String %)
- (map source-str (:trace-elems excp)))))]
+ (let [this-source-width (->> (:trace-elems excp)
+ (map (comp count source-str))
+ (sort)
+ (utils/fence))]
(if-let [cause (:cause excp)]
(max this-source-width (find-source-width cause))
this-source-width)))

0 comments on commit 2254905

Please sign in to comment.