Skip to content

Commit b6b68a8

Browse files
committed
add type hints, mark 0.2.5-alpha1
1 parent 3f88780 commit b6b68a8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

project.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(defproject byte-streams "0.2.4"
1+
(defproject byte-streams "0.2.5-alpha1"
22
:description "A simple way to handle the menagerie of Java byte represenations."
33
:license {:name "MIT License"
44
:url "http://opensource.org/licenses/MIT"}

src/byte_streams.clj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -434,8 +434,8 @@
434434
(mapv
435435
#(-> buf
436436
.duplicate
437-
(.position %)
438-
^ByteBuffer (.limit (min lim (+ % chunk-size)))
437+
(.position (int %))
438+
^ByteBuffer (.limit (min lim (+ (int %) chunk-size)))
439439
.slice)
440440
indices))
441441
[buf]))
@@ -709,7 +709,7 @@
709709
ByteBuffer
710710
(take-bytes! [this n _]
711711
(when (pos? (.remaining this))
712-
(let [n (min (.remaining this) n)
712+
(let [n (int (min (.remaining this) n))
713713
buf (-> this
714714
.duplicate
715715
^ByteBuffer (.limit (+ (.position this) n))

0 commit comments

Comments
 (0)