Merge pull request #4603 from JackStouffer/cache

Enhanced cache and map to provide length info for their slices
This commit is contained in:
Andrei Alexandrescu 2016-07-15 16:45:30 -04:00 committed by GitHub
commit cd68d1a582

View file

@ -426,8 +426,8 @@ private struct _Cache(R, bool bidir)
}
body
{
import std.range : take;
return this[low .. $].take(high - low);
import std.range : takeExactly;
return this[low .. $].takeExactly(high - low);
}
}
}
@ -641,8 +641,8 @@ private struct MapResult(alias fun, Range)
auto opSlice(opSlice_t low, opSlice_t high)
{
import std.range : take;
return this[low .. $].take(high - low);
import std.range : takeExactly;
return this[low .. $].takeExactly(high - low);
}
}
}