some simple @trusted -> @safe upgrades (#240)
some simple @trusted -> @safe upgrades merged-on-behalf-of: Basile-z <Basile-z@users.noreply.github.com>
This commit is contained in:
parent
11020e46ed
commit
dcb4dcb93a
|
@ -143,7 +143,7 @@ struct Dumper
|
|||
* Throws: YAMLException on error (e.g. invalid nodes,
|
||||
* unable to write to file/stream).
|
||||
*/
|
||||
void dump(CharacterType = char, Range)(Range range, Node[] documents ...) @trusted
|
||||
void dump(CharacterType = char, Range)(Range range, Node[] documents ...)
|
||||
if (isOutputRange!(Range, CharacterType) &&
|
||||
isOutputRange!(Range, char) || isOutputRange!(Range, wchar) || isOutputRange!(Range, dchar))
|
||||
{
|
||||
|
|
|
@ -750,7 +750,7 @@ struct Emitter(Range, CharType) if (isOutputRange!(Range, CharType))
|
|||
//{
|
||||
// writeIndent();
|
||||
//}
|
||||
auto writer = ScalarWriter!(Range, CharType)(this, analysis_.scalar,
|
||||
auto writer = ScalarWriter!(Range, CharType)(&this, analysis_.scalar,
|
||||
context_ != Context.mappingSimpleKey);
|
||||
with(writer) final switch(style_)
|
||||
{
|
||||
|
@ -1344,9 +1344,9 @@ struct ScalarWriter(Range, CharType)
|
|||
|
||||
public:
|
||||
///Construct a ScalarWriter using emitter to output text.
|
||||
this(ref Emitter!(Range, CharType) emitter, string text, const bool split = true) @trusted nothrow
|
||||
this(Emitter!(Range, CharType)* emitter, string text, const bool split = true) @safe nothrow
|
||||
{
|
||||
emitter_ = &emitter;
|
||||
emitter_ = emitter;
|
||||
text_ = text;
|
||||
split_ = split;
|
||||
}
|
||||
|
|
|
@ -247,7 +247,7 @@ final class Parser
|
|||
}
|
||||
|
||||
///Parse explicit document start.
|
||||
Event parseDocumentStart() @trusted
|
||||
Event parseDocumentStart() @safe
|
||||
{
|
||||
//Parse any extra document end indicators.
|
||||
while(scanner_.front.id == TokenID.documentEnd)
|
||||
|
|
Loading…
Reference in a new issue