Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Use 'dest' as name for bytes param #456

Merged
merged 1 commit into from
May 15, 2018
Merged

Conversation

archer884
Copy link
Contributor

@archer884 archer884 commented May 15, 2018

Other implementations of RngCore appear to consistently use "dest" as the name for this parameter. I have submitted this PR because RLS uses this name for autocomplete, which can result in mild annoyance when it doesn't match as anticipated.

Copy link
Contributor

@pitdicker pitdicker left a comment

Choose a reason for hiding this comment

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

Thank you for the PR!

@@ -112,7 +112,7 @@ impl RngCore for ThreadRng {
unsafe { (*self.rng.get()).next_u64() }
}

fn fill_bytes(&mut self, bytes: &mut [u8]) {
fn fill_bytes(&mut self, dest: &mut [u8]) {
unsafe { (*self.rng.get()).fill_bytes(bytes) }
Copy link
Contributor

Choose a reason for hiding this comment

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

One more line to change...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, I ran tests on Master because apparently today is Monday. :)

Copy link
Member

Choose a reason for hiding this comment

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

Is it? Well, second time lucky 😄

Other implementations of RngCore appear to consistently use "dest" as the name for this parameter.
@dhardy dhardy merged commit 89b268e into rust-random:master May 15, 2018
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants