From 839286cbc6ca1bae5d24a41a915ec1b15f6cd66e Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Sun, 24 Jul 2022 20:41:09 +0800 Subject: [PATCH] replace shallowCopy with move (#217) --- cligen/sysUt.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cligen/sysUt.nim b/cligen/sysUt.nim index 3b4237f1..123a760a 100644 --- a/cligen/sysUt.nim +++ b/cligen/sysUt.nim @@ -13,7 +13,8 @@ proc findUO*(s: string, c: char): int {.noSideEffect.} = proc delete*(x: var string, i: Natural) {.noSideEffect.} = ## Just like ``delete(var seq[T], i)`` but for ``string``. let xl = x.len - for j in i.int .. xl-2: shallowCopy(x[j], x[j+1]) + for j in i.int .. xl-2: + x[j] = move x[j+1] setLen(x, xl-1) iterator maybePar*(parallel: bool, a, b: int): int =