mirror of
https://github.com/dlang/phobos.git
synced 2025-05-03 16:40:48 +03:00
Solved a minor bug
This commit is contained in:
parent
2e896520c9
commit
ff4b6b9e65
1 changed files with 2 additions and 5 deletions
|
@ -1368,8 +1368,7 @@ if (isInputRange!InputRange &&
|
||||||
static if (is(InputRange : SortedRange!TT, TT) && isDefaultPred)
|
static if (is(InputRange : SortedRange!TT, TT) && isDefaultPred)
|
||||||
{
|
{
|
||||||
auto lb = haystack.lowerBound(needle);
|
auto lb = haystack.lowerBound(needle);
|
||||||
if ((lb.length == 0 && haystack[0] != needle) || lb.length == haystack.length
|
if (lb.length == haystack.length || haystack[lb.length] != needle)
|
||||||
|| haystack[lb.length] != needle)
|
|
||||||
return haystack[$ .. $];
|
return haystack[$ .. $];
|
||||||
|
|
||||||
return haystack[lb.length .. $];
|
return haystack[lb.length .. $];
|
||||||
|
@ -1850,10 +1849,8 @@ if (isRandomAccessRange!R1 && hasLength!R1 && hasSlicing!R1 && isBidirectionalRa
|
||||||
|
|
||||||
if (m[1].empty)
|
if (m[1].empty)
|
||||||
return haystack[partitions[0].length + partitions[1].length - count .. $];
|
return haystack[partitions[0].length + partitions[1].length - count .. $];
|
||||||
if (!m[1].empty)
|
|
||||||
return haystack[$ .. $];
|
|
||||||
}
|
}
|
||||||
static if (isRandomAccessRange!R2)
|
else static if (isRandomAccessRange!R2)
|
||||||
{
|
{
|
||||||
immutable lastIndex = needleLength - 1;
|
immutable lastIndex = needleLength - 1;
|
||||||
auto last = needle[lastIndex];
|
auto last = needle[lastIndex];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue