File tree Expand file tree Collapse file tree 2 files changed +15
-13
lines changed Expand file tree Collapse file tree 2 files changed +15
-13
lines changed Original file line number Diff line number Diff line change 1
- (defproject byte-streams " 0.2.4-alpha3 "
1
+ (defproject byte-streams " 0.2.4-alpha4 "
2
2
:description " A simple way to handle the menagerie of Java byte represenations."
3
3
:license {:name " MIT License"
4
4
:url " http://opensource.org/licenses/MIT" }
7
7
[manifold " 0.1.7-alpha5" ]]
8
8
:profiles {:dev {:dependencies [[org.clojure/clojure " 1.8.0" ]
9
9
[org.clojure/test.check " 0.9.0" ]
10
+ [rhizome " 0.2.9" ]
10
11
[codox-md " 0.2.0" :exclusions [org.clojure/clojure]]]}}
11
12
:test-selectors {:stress :stress
12
13
:default (complement :stress )}
Original file line number Diff line number Diff line change 286
286
result)))))))
287
287
288
288
(defn seq-conversion-fn [g convert wrapper dst]
289
- (let [path (->> g
290
- possible-sources
291
- (remove #(nil? (.wrapper ^Type %)))
292
- (map #(conversion-path g % dst))
293
- (remove nil?)
294
- (sort-by :cost )
295
- first)
289
+ (let [path (->> g
290
+ possible-sources
291
+ (remove #(nil? (.wrapper ^Type %)))
292
+ (remove #(#{String CharSequence} (.type ^Type %)))
293
+ (map #(conversion-path g % dst))
294
+ (remove nil?)
295
+ (sort-by :cost )
296
+ first)
296
297
^Type src (-> path :path first first)]
297
298
298
299
(when src
299
300
(let [wrapper' (.wrapper src)
300
- type' (.type src)]
301
+ type' (.type src)]
301
302
(fn [x options]
302
303
(->> x
303
304
304
305
((condp = [wrapper wrapper']
305
- '[seq vector] vec
306
+ '[seq vector] vec
306
307
'[stream vector] (comp vec s/stream->seq)
307
- '[seq stream] s/->source
308
- '[stream seq] s/stream->seq
308
+ '[seq stream] s/->source
309
+ '[stream seq] s/stream->seq
309
310
identity))
310
311
311
312
((condp = wrapper'
312
313
'vector (partial mapv #(convert % type' options))
313
- 'seq (partial map #(convert % type' options))
314
+ 'seq (partial map #(convert % type' options))
314
315
'stream (partial s/map #(convert % type' options))))
315
316
316
317
(#((conversion-fn g src (-> path :path last last)) % options))))))))
You can’t perform that action at this time.
0 commit comments