From 8bd1faf2f33e455831b80df4493195848fd03b99 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Thu, 26 May 2022 10:08:50 -0400 Subject: sub dependency update, updates D-YAML --- src/ext_depends/D-YAML/docs/tutorials/custom_types.md | 4 ++-- src/ext_depends/D-YAML/docs/tutorials/getting_started.md | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/ext_depends/D-YAML/docs') diff --git a/src/ext_depends/D-YAML/docs/tutorials/custom_types.md b/src/ext_depends/D-YAML/docs/tutorials/custom_types.md index 7e4e10b..6b1b7a5 100644 --- a/src/ext_depends/D-YAML/docs/tutorials/custom_types.md +++ b/src/ext_depends/D-YAML/docs/tutorials/custom_types.md @@ -236,13 +236,13 @@ void main() { try { - auto dumper = dumper(File("output.yaml", "w").lockingTextWriter); + auto dumper = dumper(); auto document = Node([Color(255, 0, 0), Color(0, 255, 0), Color(0, 0, 255)]); - dumper.dump(document); + dumper.dump(File("output.yaml", "w").lockingTextWriter, document); } catch(YAMLException e) { diff --git a/src/ext_depends/D-YAML/docs/tutorials/getting_started.md b/src/ext_depends/D-YAML/docs/tutorials/getting_started.md index 58cf191..3947e37 100644 --- a/src/ext_depends/D-YAML/docs/tutorials/getting_started.md +++ b/src/ext_depends/D-YAML/docs/tutorials/getting_started.md @@ -58,7 +58,7 @@ void main() writeln("The answer is ", root["Answer"].as!int); //Dump the loaded document to output.yaml. - dumper(File("output.yaml", "w").lockingTextWriter).dump(root); + dumper.dump(File("output.yaml", "w").lockingTextWriter, root); } ``` @@ -100,8 +100,8 @@ will try to convert it, throwing *YAMLException* if not possible. Finally we dump the document we just read to `output.yaml` with the *Dumper.dump()* method. *Dumper* is a struct used to dump YAML -documents. *dumper()* accepts a range to write the document to. -The *dump()* method writes one or more documents to the range, +documents. *dumper()* returns a *Dumper* with the default setting. +The *dump()* method writes one or more documents to a range, throwing *YAMLException* if it could not be written to. D:YAML tries to preserve style information in documents so e.g. `[Hello, -- cgit v1.2.3