From 57b9798bb05851c7d963a3153478edfdced59638 Mon Sep 17 00:00:00 2001 From: Vijay Nayar Date: Sun, 24 Apr 2022 17:16:55 +0200 Subject: [PATCH] Revert "Modify binarydecoder to copy bytes from input range." This reverts commit c9268a02f7620e3664a9f86fc8043f01052006e2. --- source/avro/codec/binarydecoder.d | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/avro/codec/binarydecoder.d b/source/avro/codec/binarydecoder.d index 03caa84..8bfb817 100644 --- a/source/avro/codec/binarydecoder.d +++ b/source/avro/codec/binarydecoder.d @@ -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; } /// @@ -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; } /// @@ -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; } ///