Skip to content

Commit

Permalink
Switch toString sink overload back to 'in' parameter
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Geod24 committed Dec 8, 2021
1 parent 3515143 commit 4df16a2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions source/geod24/bitblob.d
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
};
Expand Down

0 comments on commit 4df16a2

Please # to comment.