update examples so they can compile again, and make them visible to dub

This commit is contained in:
Cameron Ross 2018-04-27 00:17:09 -03:00 committed by Petar Kirov
parent b44f96bd9f
commit 4680e1b5b2
15 changed files with 57 additions and 54 deletions

View file

@ -5,6 +5,6 @@
"mainSourceFile": "yaml_gen.d",
"dependencies":
{
"dyaml": { "version" : "~>0.5.0" },
},
"dyaml": { "version" : "*" }
}
}

View file

@ -8,7 +8,7 @@ import std.math;
import std.random;
import std.stdio;
import std.string;
import dyaml.all;
import dyaml;
Node config;
@ -220,7 +220,7 @@ Node pairs(bool root, bool complex, Node range, string tag)
{
auto key = generateNode(randomType(typesScalarKey ~ (complex ? typesCollection : [])));
// Maps can't contain duplicate keys
while(tag.endsWith("map") && keys[0 .. i].canFind(key))
while(tag.endsWith("map") && keys[0 .. i].canFind(key))
{
key = generateNode(randomType(typesScalarKey ~ (complex ? typesCollection : [])));
}