Minor optimization.

This commit is contained in:
Ferdinand Majerech 2014-08-05 18:21:42 +02:00
parent b2d0c74e56
commit 8902ea8806

View file

@ -1824,7 +1824,8 @@ final class Scanner
static bool end(Reader reader_) @safe pure nothrow @nogc
{
return ("---" == reader_.prefix(3) || "..." == reader_.prefix(3))
const prefix = reader_.prefix(3);
return ("---" == prefix || "..." == prefix)
&& " \t\0\n\r\u0085\u2028\u2029"d.canFind(reader_.peek(3));
}