From 46c379a14ef8d94bb79e3f8d2f4dde017fdacb54 Mon Sep 17 00:00:00 2001 From: Sebastian Wilzbach Date: Mon, 22 Jan 2018 17:19:14 +0100 Subject: [PATCH] Remove staticIota: std_uni --- std/uni.d | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/std/uni.d b/std/uni.d index 088dfe63fba..dfdb5414c89 100644 --- a/std/uni.d +++ b/std/uni.d @@ -4929,7 +4929,6 @@ template Utf8Matcher() bool lookup(int size, Mode mode, Range)(ref Range inp) const pure @trusted { - import std.typecons : staticIota; if (inp.length < size) { badEncoding(); @@ -4937,7 +4936,7 @@ template Utf8Matcher() } char[size] needle = void; needle[0] = leadMask!size & inp[0]; - foreach (i; staticIota!(1, size)) + static foreach (i; 1 .. size) { needle[i] = truncate(inp[i]); } @@ -5634,7 +5633,7 @@ template Sequence(size_t start, size_t end) { import std.stdio : writefln, writeln; writeln("---TRIE FOOTPRINT STATS---"); - foreach (i; staticIota!(0, t.table.dim) ) + static foreach (i; 0 .. t.table.dim) { writefln("lvl%s = %s bytes; %s pages" , i, t.bytes!i, t.pages!i); @@ -5643,7 +5642,7 @@ template Sequence(size_t start, size_t end) version(none) { writeln("INDEX (excluding value level):"); - foreach (i; staticIota!(0, t.table.dim-1) ) + static foreach (i; 0 .. t.table.dim-1) writeln(t.table.slice!(i)[0 .. t.table.length!i]); } writeln("---------------------------");