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

style: (tiny) rename variable to avoid shadowing #1654

Merged
merged 1 commit into from
Feb 21, 2024
Merged

Conversation

insumity
Copy link
Contributor

@insumity insumity commented Feb 21, 2024

Description

This is a tiny PR to avoid possible confusion when looking at the QueueVSCPacket code. We rename valUpdates returned from the staking module to stakingValUpdates so that the valUpdates variable in the for loop does not shadow the outside variable. See 50 Shades of Go for more on this.

Thanks to @MSalopek for pointing out the correctness of the original code!


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • Included the correct type prefix in the PR title
  • Targeted the correct branch (see PR Targeting)
  • Provided a link to the relevant issue or specification
  • Reviewed "Files changed" and left comments if necessary
  • Confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • Confirmed the correct type prefix in the PR title
  • Confirmed all author checklist items have been addressed
  • Confirmed that this PR does not change production code

@github-actions github-actions bot added the C:x/provider Assigned automatically by the PR labeler label Feb 21, 2024
@insumity insumity marked this pull request as ready for review February 21, 2024 15:31
@insumity insumity requested a review from a team as a code owner February 21, 2024 15:31
Copy link
Contributor

@MSalopek MSalopek left a comment

Choose a reason for hiding this comment

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

LGTM!

@mpoke mpoke added this pull request to the merge queue Feb 21, 2024
Merged via the queue into main with commit 6d09487 Feb 21, 2024
17 checks passed
@mpoke mpoke deleted the insumity/nit-var-shadow branch February 21, 2024 16:03
mergify bot pushed a commit that referenced this pull request Feb 21, 2024
rename var to avoid shadowing

(cherry picked from commit 6d09487)
mpoke pushed a commit that referenced this pull request Feb 21, 2024
)

style: (tiny) rename variable to avoid shadowing (#1654)

rename var to avoid shadowing

(cherry picked from commit 6d09487)

Co-authored-by: insumity <karolos@informal.systems>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:x/provider Assigned automatically by the PR labeler
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants