Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions std/algorithm/searching.d
Original file line number Diff line number Diff line change
Expand Up @@ -1601,7 +1601,8 @@ if (isInputRange!InputRange &&
{
if (!__ctfe && canSearchInCodeUnits!char(needle))
{
static R trustedMemchr(ref R haystack, ref E needle) @trusted nothrow pure
static inout(R) trustedMemchr(ref return scope inout(R) haystack,
ref const scope E needle) @trusted nothrow pure
{
import core.stdc.string : memchr;
auto ptr = memchr(haystack.ptr, needle, haystack.length);
Expand Down Expand Up @@ -1665,7 +1666,7 @@ if (isInputRange!InputRange &&
{
import std.algorithm.comparison : max, min;

R findHelper(ref R haystack, ref E needle) @trusted nothrow pure
R findHelper(return scope ref R haystack, ref E needle) @trusted nothrow pure
{
import core.stdc.string : memchr;

Expand Down