From bfa7c6020fdb87a389ea2949d2718a19467af785 Mon Sep 17 00:00:00 2001 From: Tristan Brice Velloza Kildaire Date: Thu, 2 May 2024 08:35:45 +0200 Subject: [PATCH] View - Fixed range-based `opSlice(...)` View (unittests) - Added unittest --- source/niknaks/containers.d | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/niknaks/containers.d b/source/niknaks/containers.d index 862706f..75924fe 100644 --- a/source/niknaks/containers.d +++ b/source/niknaks/containers.d @@ -758,7 +758,7 @@ if(isSector!(SectorType)()) { // FIXME: This is lazy, do a check for up to where // and actually make THIS the real implementation - return this.opSlice()[start, end]; + return this.opSlice()[start..end]; } private static bool isArrayAppend(P)() @@ -894,6 +894,7 @@ unittest assert(view[1] == 3); assert(view[2] == 45); assert(view[3] == 2); + assert(view[0..2] == [1,3]); // Update elements view[0] = 71;