mirror of
https://github.com/dlang/phobos.git
synced 2025-04-29 22:50:38 +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)
|
||||
{
|
||||
auto lb = haystack.lowerBound(needle);
|
||||
if ((lb.length == 0 && haystack[0] != needle) || lb.length == haystack.length
|
||||
|| haystack[lb.length] != needle)
|
||||
if (lb.length == haystack.length || haystack[lb.length] != needle)
|
||||
return haystack[$ .. $];
|
||||
|
||||
return haystack[lb.length .. $];
|
||||
|
@ -1850,10 +1849,8 @@ if (isRandomAccessRange!R1 && hasLength!R1 && hasSlicing!R1 && isBidirectionalRa
|
|||
|
||||
if (m[1].empty)
|
||||
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;
|
||||
auto last = needle[lastIndex];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue