Skip to content

Commit

Permalink
Revert "Modify binarydecoder to copy bytes from input range."
Browse files Browse the repository at this point in the history
This reverts commit c9268a0.
  • Loading branch information
vnayar committed Apr 24, 2022
1 parent c9268a0 commit 57b9798
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions source/avro/codec/binarydecoder.d
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ if (isInputRange!IRangeT && is(ElementType!(IRangeT) : ubyte))
size_t len = doReadLength();
ubyte[] bytes = iRange.take(len)[];
doSkipBytes(len);
return bytes.idup.assumeUTF;
return bytes.assumeUTF;
}

///
Expand Down Expand Up @@ -183,7 +183,7 @@ if (isInputRange!IRangeT && is(ElementType!(IRangeT) : ubyte))
size_t len = doReadLength();
ubyte[] bytes = iRange.take(len)[];
doSkipBytes(len);
return bytes.dup;
return bytes;
}

///
Expand Down Expand Up @@ -219,7 +219,7 @@ if (isInputRange!IRangeT && is(ElementType!(IRangeT) : ubyte))
ubyte[] readFixed(size_t length) {
ubyte[] bytes = iRange.take(length)[];
iRange.popFrontN(length);
return bytes.dup;
return bytes;
}

///
Expand Down

0 comments on commit 57b9798

Please sign in to comment.