got rid of unnecessary temporary variable

This commit is contained in:
Johannes Loher 2017-04-14 14:33:50 +02:00
parent 446f9a096b
commit ff4c72628f

View file

@ -11,9 +11,8 @@ void loadSubstitutionFile(alias slurpFun = slurp)(string fileName)
{ {
import std.algorithm.iteration : each; import std.algorithm.iteration : each;
auto data = slurpFun!(string, string)(fileName, `"%s" = "%s"`);
map = (string[string]).init; map = (string[string]).init;
data.each!(pair => map[pair[0]] = pair[1]); slurpFun!(string, string)(fileName, `"%s" = "%s"`).each!(pair => map[pair[0]] = pair[1]);
} }
@safe unittest @safe unittest