Skip to content
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

Merged
merged 1 commit into from
Apr 4, 2024
Merged

Conversation

MishkaRogachev
Copy link
Contributor

@status-im-auto
Copy link
Member

status-im-auto commented Apr 3, 2024

Jenkins Builds

Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ a42b2a4 #1 2024-04-03 14:57:14 ~7 min tests/nim 📄log
✔️ a42b2a4 #1 2024-04-03 14:57:38 ~8 min macos/aarch64 🍎dmg
✔️ a42b2a4 #1 2024-04-03 15:00:43 ~11 min macos/x86_64 🍎dmg
✔️ a42b2a4 #1 2024-04-03 15:02:22 ~12 min tests/ui 📄log
✔️ a42b2a4 #1 2024-04-03 15:07:56 ~18 min linux/x86_64 📦tgz
✔️ a42b2a4 #1 2024-04-03 15:13:56 ~24 min windows/x86_64 💿exe
✔️ 86597c1 #2 2024-04-04 10:20:56 ~5 min macos/aarch64 🍎dmg
✔️ 86597c1 #2 2024-04-04 10:22:09 ~6 min tests/nim 📄log
✔️ 86597c1 #2 2024-04-04 10:24:01 ~8 min macos/x86_64 🍎dmg
✔️ 86597c1 #2 2024-04-04 10:27:10 ~11 min tests/ui 📄log
✔️ 86597c1 #2 2024-04-04 10:31:09 ~15 min linux/x86_64 📦tgz
✔️ 86597c1 #2 2024-04-04 10:41:19 ~25 min windows/x86_64 💿exe

@@ -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 = @[]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
result = @[]

Copy link
Member

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)

Copy link
Member

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

@MishkaRogachev MishkaRogachev merged commit 6883db3 into master Apr 4, 2024
8 checks passed
@MishkaRogachev MishkaRogachev deleted the fix/fix-compile-warning branch April 4, 2024 14:42
@jrainville jrainville modified the milestone: 2.29.0 Beta Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants