Skip to content

Commit

Permalink
Merge pull request #1831 from rainers/fix_import
Browse files Browse the repository at this point in the history
regression: missing import std.utf : canSearchInCodeUnits; in std.algorithm.find
  • Loading branch information
monarchdodra committed Jan 4, 2014
2 parents d2cdbe3 + 60cf6a5 commit 9494fea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions std/algorithm.d
Expand Up @@ -3968,13 +3968,13 @@ if (isInputRange!InputRange &&
//These are two special cases which can search without decoding the UTF stream.
static if (isDefaultPred && isIntegralNeedle)
{
import std.utf : canSearchInCodeUnits;

//This special case deals with UTF8 search, when the needle
//is represented by a single code point.
//Note: "needle <= 0x7F" properly handles sign via unsigned promotion
static if (is(UEEType == char))
{
import std.utf : canSearchInCodeUnits;

if (!__ctfe && canSearchInCodeUnits!char(needle))
{
static R trustedMemchr(ref R haystack, ref E needle) @trusted nothrow pure
Expand Down

0 comments on commit 9494fea

Please sign in to comment.