mirror of
https://github.com/dlang/phobos.git
synced 2025-04-30 23:20:29 +03:00
Improve std.regex build times by removing a formattedWrite call
This commit is contained in:
parent
a33d048302
commit
ff86bb0d70
1 changed files with 8 additions and 6 deletions
|
@ -1010,12 +1010,14 @@ if (isForwardRange!R && is(ElementType!R : dchar))
|
||||||
//
|
//
|
||||||
@trusted void error(string msg)
|
@trusted void error(string msg)
|
||||||
{
|
{
|
||||||
import std.array : appender;
|
import std.conv : text;
|
||||||
import std.format.write : formattedWrite;
|
string app = msg;
|
||||||
auto app = appender!string();
|
app ~= "\nPattern with error: `";
|
||||||
formattedWrite(app, "%s\nPattern with error: `%s` <--HERE-- `%s`",
|
app ~= origin[0..$-pat.length].text;
|
||||||
msg, origin[0..$-pat.length], pat);
|
app ~= "` <--HERE-- `";
|
||||||
throw new RegexException(app.data);
|
app ~= pat.text;
|
||||||
|
app ~= "`";
|
||||||
|
throw new RegexException(app);
|
||||||
}
|
}
|
||||||
|
|
||||||
alias Char = BasicElementOf!R;
|
alias Char = BasicElementOf!R;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue