* Fix #14994

* Revert misplaced "optimization"

* Typo
This commit is contained in:
Clyybber 2020-07-15 23:33:58 +02:00 • committed by GitHub
commit 282128ab66
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 1 deletions

View file

@ -527,7 +527,8 @@ proc insert*[T](dest: var seq[T], src: openArray[T], pos = 0) =
assert dest == outcome
var j = len(dest) - 1
var i = len(dest) + len(src) - 1
var i = j + len(src)
if i == j: return
dest.setLen(i + 1)
# Move items after `pos` to the end of the sequence.