-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hotfix: fix compilation warning #14273
Conversation
Jenkins Builds
|
src/app_service/common/utils.nim
Outdated
@@ -89,7 +89,7 @@ proc contractUniqueKey*(chainId: int, contractAddress: string): string = | |||
return $chainId & "_" & contractAddress | |||
|
|||
proc intersectSeqs*[T](seq1, seq2: seq[T]): seq[T] = | |||
var result: seq[T] = @[] | |||
result = @[] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
result = @[] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The whole thing can be reduced to:
proc intersectSeqs*[T](seq1, seq2: seq[T]): seq[T] =
for item in seq1:
if item in seq2:
result.add(item)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even drop the final return
a42b2a4
to
86597c1
Compare
Fix #14252 (review)