Skip to content

Commit 2807e3c

Browse files
committed
remove unnecessary dup
1 parent 0864c1e commit 2807e3c

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/nimble.nim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1480,7 +1480,7 @@ proc validateDevModeDepsWorkingCopiesBeforeLock(
14801480
}
14811481

14821482
# Remove not errors from the errors set.
1483-
for name, error in common.dup(errors):
1483+
for name, error in errors:
14841484
if error.kind in notAnErrorSet:
14851485
errors.del name
14861486

@@ -1699,7 +1699,7 @@ proc sync(options: Options) =
16991699
var errors: ValidationErrors
17001700
findValidationErrorsOfDevDepsWithLockFile(pkgInfo, options, errors)
17011701

1702-
for name, error in common.dup(errors):
1702+
for name, error in errors:
17031703
if error.kind == vekWorkingCopyNeedsSync:
17041704
if not options.action.listOnly:
17051705
syncWorkingCopy(name, error.path, pkgInfo, options)

src/nimblepkg/common.nim

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@ template newClone*[T: not ref](obj: T): ref T =
5252
result[] = obj
5353
result
5454

55-
proc dup*[T](obj: T): T = obj
56-
5755
proc `$`*(p: ptr | ref): string = cast[int](p).toHex
5856
## Converts the pointer `p` to its hex string representation.
5957

0 commit comments

Comments
 (0)