Skip to content

Commit

Permalink
Enhanced cache and map to provide length info for their slices
Browse files Browse the repository at this point in the history
  • Loading branch information
JackStouffer committed Jul 14, 2016
1 parent 2443331 commit fcb5709
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions std/algorithm/iteration.d
Expand Up @@ -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);
}
}
}
Expand Down Expand Up @@ -637,8 +637,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);
}
}
}
Expand Down

0 comments on commit fcb5709

Please sign in to comment.