Skip to content

Use 'dest' as name for bytes param#456

Merged
dhardy merged 1 commit into
rust-random:masterfrom
archer884:patch-1
May 15, 2018
Merged

Use 'dest' as name for bytes param#456
dhardy merged 1 commit into
rust-random:masterfrom
archer884:patch-1

Conversation

@archer884

@archer884 archer884 commented May 15, 2018

Copy link
Copy Markdown
Contributor

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.

@pitdicker pitdicker left a comment

Copy link
Copy Markdown
Contributor

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!

Comment thread src/rngs/thread.rs Outdated

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
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.

3 participants