From 53c476ce387e5474d1d68f3fb54233759a94c16f Mon Sep 17 00:00:00 2001 From: Vindaar Date: Mon, 8 Oct 2018 19:08:47 +0200 Subject: [PATCH] remove unnecessary if branch related too seq construction Not needed anymore, since seqs can never be nil nowadays. --- yaml/serialization.nim | 2 -- 1 file changed, 2 deletions(-) diff --git a/yaml/serialization.nim b/yaml/serialization.nim index 690c840..7c9e485 100644 --- a/yaml/serialization.nim +++ b/yaml/serialization.nim @@ -1351,8 +1351,6 @@ proc load*[K](input: Stream | string, target: var K) else: internalError("Unexpected exception: " & $e.parent.name) proc loadMultiDoc*[K](input: Stream | string, target: var seq[K]) = - if target.len == 0: - target = newSeq[K]() var parser = newYamlParser(serializationTagLibrary) events = parser.parse(input)