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

Fix unused generator parameter in Array.random(count:using:) #2907

Merged
merged 1 commit into from
Nov 9, 2022

Conversation

michal-tomlein
Copy link
Contributor

@michal-tomlein michal-tomlein commented Nov 8, 2022

The generator parameter in Array.random(count:using:) was unused in what appears to be a copy-paste error. This change passes it down to FixedWidthInteger.random(using:), which was the original intention.

@Joannis Joannis added the semver-patch Internal changes only label Nov 8, 2022
@Joannis
Copy link
Member

Joannis commented Nov 8, 2022

Thanks for spotting that detail! That's gotta be an oversight. Ping @0xTim / @gwynne

Copy link
Member

@0xTim 0xTim left a comment

Choose a reason for hiding this comment

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

Thanks!

@0xTim
Copy link
Member

0xTim commented Nov 9, 2022

Original comment:

The generator parameter in Array.random(count:using:) was unused in what appears to be a copy-paste error. This change passes it down to FixedWidthInteger.random(using:), which seems to have been the original intention.

If that was not the original intention of the code author, I believe a comment should be added to explain why the parameter is unused.

@0xTim 0xTim merged commit a037bbf into vapor:main Nov 9, 2022
@VaporBot
Copy link
Contributor

VaporBot commented Nov 9, 2022

These changes are now available in 4.67.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-patch Internal changes only
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants