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": "main.d",
"dependencies":
{
"dyaml": { "version" : "~>0.5.0" },
},
"dyaml": { "version" : "*" }
}
}

View file

@ -1,5 +1,5 @@
import std.stdio;
import dyaml.all;
import dyaml;
struct Color
{
@ -16,7 +16,7 @@ struct Color
}
}
Node representColor(ref Node node, Representer representer)
Node representColor(ref Node node, Representer representer) @safe
{
//The node is guaranteed to be Color as we add representer for Color.
Color color = node.as!Color;