mirror of
https://github.com/dlang/phobos.git
synced 2025-04-29 22:50:38 +03:00
Merge pull request #4603 from JackStouffer/cache
Enhanced cache and map to provide length info for their slices
This commit is contained in:
commit
cd68d1a582
1 changed files with 4 additions and 4 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue