diff options
author | ringabout <43030857+ringabout@users.noreply.github.com> | 2023-06-02 22:03:32 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-02 16:03:32 +0200 |
commit | 1133f20fe2c834d14454c32d7d9fc2cd1fe8ffa2 (patch) | |
tree | 6eb03f314132d5022d6ebfdc7d4b706dfa8cfb5f /tests/arc/topt_no_cursor.nim | |
parent | ead7e20926b1f5ea1b06679947d3d16fcc085e68 (diff) | |
download | Nim-1133f20fe2c834d14454c32d7d9fc2cd1fe8ffa2.tar.gz |
lift the `=dup` hook (#21903)
* fixes tests again * remove helper functions * fixes closures, owned refs * final cleanup
Diffstat (limited to 'tests/arc/topt_no_cursor.nim')
-rw-r--r-- | tests/arc/topt_no_cursor.nim | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/tests/arc/topt_no_cursor.nim b/tests/arc/topt_no_cursor.nim index 32652b60a..39e5c8a9b 100644 --- a/tests/arc/topt_no_cursor.nim +++ b/tests/arc/topt_no_cursor.nim @@ -61,11 +61,9 @@ var try: it_cursor = x a = ( - `=wasMoved`(:tmpD) - `=copy`(:tmpD, it_cursor.key) + :tmpD = `=dup`(it_cursor.key) :tmpD, - `=wasMoved`(:tmpD_1) - `=copy`(:tmpD_1, it_cursor.val) + :tmpD_1 = `=dup`(it_cursor.val) :tmpD_1) echo [ :tmpD_2 = `$$`(a) @@ -125,19 +123,16 @@ this.isValid = fileExists(this.value) if dirExists(this.value): var :tmpD par = (dir: - `=wasMoved`(:tmpD) - `=copy`(:tmpD, this.value) + :tmpD = `=dup`(this.value) :tmpD, front: "") else: var :tmpD_1 :tmpD_2 :tmpD_3 par = (dir_1: parentDir(this.value), front_1: - `=wasMoved`(:tmpD_1) - `=copy`(:tmpD_1, + :tmpD_1 = `=dup`( :tmpD_3 = splitDrive do: - `=wasMoved`(:tmpD_2) - `=copy`(:tmpD_2, this.value) + :tmpD_2 = `=dup`(this.value) :tmpD_2 :tmpD_3.path) :tmpD_1) |