From ff4c72628fdbe750e7e290c1a3acdd4150d57b24 Mon Sep 17 00:00:00 2001 From: Johannes Loher Date: Fri, 14 Apr 2017 14:33:50 +0200 Subject: [PATCH] got rid of unnecessary temporary variable --- source/substitution.d | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source/substitution.d b/source/substitution.d index 315b868..66e7b9d 100644 --- a/source/substitution.d +++ b/source/substitution.d @@ -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