dyaml.node.merge() usage fix.
This commit is contained in:
parent
900bd51d52
commit
f06cb132a3
|
@ -262,7 +262,11 @@ final class Composer
|
|||
foreach(ref Node key, ref Node value; root)
|
||||
{
|
||||
if(key.isType!YAMLMerge){toMerge ~= value;}
|
||||
else{merge(result, Node.Pair(key, value));}
|
||||
else
|
||||
{
|
||||
auto temp = Node.Pair(key, value);
|
||||
merge(result, temp);
|
||||
}
|
||||
}
|
||||
foreach(node; toMerge)
|
||||
{
|
||||
|
|
|
@ -17,7 +17,7 @@ import std.datetime;
|
|||
import std.exception;
|
||||
import std.math;
|
||||
import std.range;
|
||||
import std.stdio;
|
||||
import std.stdio;
|
||||
import std.string;
|
||||
import std.traits;
|
||||
import std.typecons;
|
||||
|
@ -1779,7 +1779,7 @@ package:
|
|||
* Params: pairs = Array of pairs to merge into.
|
||||
* toMerge = Pair to merge.
|
||||
*/
|
||||
void merge(ref Node.Pair[] pairs, ref Node.Pair toMerge) @safe
|
||||
void merge(ref Node.Pair[] pairs, ref Node.Pair toMerge) @safe
|
||||
{
|
||||
foreach(ref pair; pairs)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue