Skip to content

Commit

Permalink
Merge pull request rejectedsoftware#66 from rejectedsoftware/fix_null…
Browse files Browse the repository at this point in the history
…able_deprecations

Fix Nullable!T deprecation warnings.
  • Loading branch information
s-ludwig authored Sep 5, 2019
2 parents 3b793a5 + fa2d2af commit 17a5ee0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions source/diet/parser.d
Original file line number Diff line number Diff line change
Expand Up @@ -785,8 +785,8 @@ private Node[] parseDietWithExtensions(FileInfo[] files, size_t file_index, ref
auto np = processNode(n);
if (!np.isNull()) {
if (ret.isNull) ret = nodes[0 .. i];
ret ~= np;
} else if (!ret.isNull) ret ~= n;
ret.get ~= np;
} else if (!ret.isNull) ret.get ~= n;
}
if (ret.isNull && nodes.length) ret = nodes;
}
Expand Down Expand Up @@ -842,7 +842,7 @@ private Node[] parseDietWithExtensions(FileInfo[] files, size_t file_index, ref
Nullable!(NodeContent[]) rn;
if (nc.kind == NodeContent.Kind.node) {
auto mod = processNode(nc.node);
if (!mod.isNull()) rn = mod.map!(n => NodeContent.tag(n)).array;
if (!mod.isNull()) rn = mod.get.map!(n => NodeContent.tag(n)).array;
}
assert(rn.isNull || rn.get.all!(n => n.node.name != "block"));
return rn;
Expand Down

0 comments on commit 17a5ee0

Please sign in to comment.