diff --git a/source/dyaml/representer.d b/source/dyaml/representer.d index d7a0ff2..d8bafd3 100644 --- a/source/dyaml/representer.d +++ b/source/dyaml/representer.d @@ -22,7 +22,6 @@ import std.datetime; import std.exception; import std.format; import std.math; -import std.stream; import std.typecons; import std.string; @@ -677,6 +676,8 @@ Node representMyClass(ref Node node, Representer representer) @system return representer.representScalar("!myclass.tag", scalar); } +import std.stream; + unittest { foreach(r; [&representMyStruct, diff --git a/source/dyaml/streamcompat.d b/source/dyaml/streamcompat.d index 448033d..fa035fd 100644 --- a/source/dyaml/streamcompat.d +++ b/source/dyaml/streamcompat.d @@ -24,7 +24,7 @@ ubyte[] streamToBytesGC(Stream stream) @trusted nothrow } } -/// Read all data from a std.stream.Stream into an array of bytes. +/// Read all data from a Stream into an array of bytes. /// /// Params: /// diff --git a/source/dyaml/tinyendian.d b/source/dyaml/tinyendian.d index cce397c..50fe175 100644 --- a/source/dyaml/tinyendian.d +++ b/source/dyaml/tinyendian.d @@ -95,14 +95,12 @@ auto fixUTFByteOrder(ubyte[] array) None = ubyte.max } - // From std.stream + // These 2 are from std.stream static immutable ubyte[][5] byteOrderMarks = [ [0xEF, 0xBB, 0xBF], [0xFF, 0xFE], [0xFE, 0xFF], [0xFF, 0xFE, 0x00, 0x00], [0x00, 0x00, 0xFE, 0xFF] ]; - - // From std.stream static immutable Endian[5] bomEndian = [ std.system.endian, Endian.littleEndian, Endian.bigEndian,