From bcd9bf22e3a0ec65d4b6f21a98d38521a7a64d01 Mon Sep 17 00:00:00 2001 From: Mike Bierlee Date: Sat, 24 Sep 2022 17:07:08 +0300 Subject: [PATCH] Remove unneccesary check The rest of the code already supports this case --- source/mirage/config.d | 9 --------- 1 file changed, 9 deletions(-) diff --git a/source/mirage/config.d b/source/mirage/config.d index e7ef380..64bf76d 100644 --- a/source/mirage/config.d +++ b/source/mirage/config.d @@ -177,15 +177,6 @@ class ConfigDictionary { enforce!ConfigReadException(rootNode !is null, "The config is empty"); enforce!ConfigReadException(configPath.length > 0, "Supplied config path is empty"); - if (configPath == ".") { - auto rootValue = cast(ValueNode) rootNode; - if (rootValue) { - return rootValue.value; - } else { - throw new ConfigReadException("The root of the config is not a value type"); - } - } - auto path = new ConfigPath(configPath); auto currentNode = rootNode; PathSegment currentPathSegment = path.getNextSegment();