We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ea1e9b2 commit 1e1f070Copy full SHA for 1e1f070
std/typecons.d
@@ -535,14 +535,14 @@ if (distinctFieldNames!(Specs))
535
string injectNamedFields()
536
{
537
string decl = "";
538
+ import std.conv : to;
539
foreach (i, name; staticMap!(extractName, fieldSpecs))
540
- import std.format : format;
541
-
542
- decl ~= format("alias _%s = Identity!(field[%s]);", i, i);
+ auto si = to!string(i);
+ decl ~= "alias _" ~ si ~ " = Identity!(field[" ~ si ~ "]);";
543
if (name.length != 0)
544
545
- decl ~= format("alias %s = _%s;", name, i);
+ decl ~= "alias " ~ name ~ " = _" ~ si ~ ";";
546
}
547
548
return decl;
0 commit comments