Remove unneccesary check

The rest of the code already supports this case
This commit is contained in:
Mike Bierlee 2022-09-24 17:07:08 +03:00
parent 373f2fc1c3
commit bcd9bf22e3

View file

@ -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();