got rid of unnecessary temporary variable
This commit is contained in:
parent
446f9a096b
commit
ff4c72628f
1 changed files with 1 additions and 2 deletions
|
@ -11,9 +11,8 @@ void loadSubstitutionFile(alias slurpFun = slurp)(string fileName)
|
|||
{
|
||||
import std.algorithm.iteration : each;
|
||||
|
||||
auto data = slurpFun!(string, string)(fileName, `"%s" = "%s"`);
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue