From 4df16a23f31d54843fa0af61406fecd08c19192e Mon Sep 17 00:00:00 2001 From: Geod24 Date: Wed, 8 Dec 2021 14:13:27 +0100 Subject: [PATCH] Switch toString sink overload back to 'in' parameter Now that the bug has been fixed for a few release (v2.096.1), we can revert to using 'in', especially as it only affect users of '-preview=in', which are bleeding edge users. --- source/geod24/bitblob.d | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/geod24/bitblob.d b/source/geod24/bitblob.d index b088716..b597852 100644 --- a/source/geod24/bitblob.d +++ b/source/geod24/bitblob.d @@ -82,14 +82,14 @@ public struct BitBlob (size_t Size) ***************************************************************************/ - public void toString (scope void delegate(const(char)[]) @safe sink) const + public void toString (scope void delegate(in char[]) @safe sink) const { FormatSpec!char spec; this.toString(sink, spec); } /// Ditto - public void toString (scope void delegate(const(char)[]) @safe sink, + public void toString (scope void delegate(in char[]) @safe sink, scope const ref FormatSpec!char spec) const { /// Used for formatting @@ -136,7 +136,7 @@ public struct BitBlob (size_t Size) { size_t idx; char[StringBufferSize] buffer = void; - scope sink = (const(char)[] v) { + scope sink = (in char[] v) { buffer[idx .. idx + v.length] = v; idx += v.length; };