mirror of
https://github.com/mbierlee/mirage-config.git
synced 2024-11-15 04:44:01 +01:00
Remove unneccesary check
The rest of the code already supports this case
This commit is contained in:
parent
373f2fc1c3
commit
bcd9bf22e3
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue