summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/tanya/container/array.d2
-rw-r--r--source/tanya/container/set.d3
-rw-r--r--source/tanya/container/string.d7
3 files changed, 5 insertions, 7 deletions
diff --git a/source/tanya/container/array.d b/source/tanya/container/array.d
index 9a2fdd5..472b376 100644
--- a/source/tanya/container/array.d
+++ b/source/tanya/container/array.d
@@ -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];
}
diff --git a/source/tanya/container/set.d b/source/tanya/container/set.d
index fc18992..f26e679 100644
--- a/source/tanya/container/set.d
+++ b/source/tanya/container/set.d
@@ -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()
diff --git a/source/tanya/container/string.d b/source/tanya/container/string.d
index 564a84c..7e50458 100644
--- a/source/tanya/container/string.d
+++ b/source/tanya/container/string.d
@@ -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];
}