Permalink
Browse files
Tidy up find-source-width.
- Loading branch information...
Showing
with
4 additions
and
4 deletions.
-
+4
−4
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