Rename String.toString back to get()
Since it is expected that the return type of toString() is immutable(char)[] and not char[] or const(char)[].
This commit is contained in:
parent
8ee1d647ce
commit
6c0588164a
@ -160,7 +160,7 @@ struct Range(E)
|
||||
return typeof(return)(*this.container, this.begin + i, this.begin + j);
|
||||
}
|
||||
|
||||
inout(E[]) get() inout @trusted
|
||||
inout(E)[] get() inout @trusted
|
||||
{
|
||||
return this.begin[0 .. length];
|
||||
}
|
||||
|
@ -27,6 +27,9 @@ import tanya.memory;
|
||||
*/
|
||||
struct Range(E)
|
||||
{
|
||||
private alias ContainerType = CopyConstness!(E, Array!(Bucket!(Unqual!E)));
|
||||
private ContainerType* container;
|
||||
|
||||
@disable this();
|
||||
|
||||
@property Range save()
|
||||
|
@ -199,12 +199,7 @@ struct ByCodeUnit(E)
|
||||
return typeof(return)(*this.container, this.begin + i, this.begin + j);
|
||||
}
|
||||
|
||||
const(E)[] toString() const @trusted
|
||||
{
|
||||
return this.begin[0 .. length];
|
||||
}
|
||||
|
||||
E[] toString() @trusted
|
||||
inout(E)[] get() inout @trusted
|
||||
{
|
||||
return this.begin[0 .. length];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user