Skip to content

Remove variables that start with an underscore #477

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

Merged
merged 2 commits into from
Mar 19, 2018

Conversation

Baelyk
Copy link
Contributor

@Baelyk Baelyk commented Mar 18, 2018

Resolves #476

Removed the underscore and included the variable in the unimplemented!() macro to get around unused variable warnings.

Resolves exercism#476

Removed the underscore and included the variable in the `unimplemented!()` macro to get around unused variable warnings.
Copy link
Member

@petertseng petertseng left a comment

Choose a reason for hiding this comment

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

Thanks for taking all this on.

pub fn private_key(_p: u64) -> u64 {
unimplemented!()
pub fn private_key(p: u64) -> u64 {
unimplemented!("Pick a private key greater than and less than {}", p)
Copy link
Member

Choose a reason for hiding this comment

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

This is missing something after greater than

(Since it would be difficult for a number to be simultaneously greater than p and less than p, which is what this sentence means if there's nothing after greater than)

}
pub fn secret(p: u64, b_pub: u64, a: u64) -> u64 {
unimplemented!("Calculate secret key using prime number {}, public key {}, and private key {}", p, b_pub, a)
}
Copy link
Member

Choose a reason for hiding this comment

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

there was a trailing newline in this file. Since this PR should be focused on dealing with underscore-prefixed names and not with whitespace, the trailing newline should not be removed in this PR

(also the trailing newline should stay anyway, by convention)

(Same comment for all other files)

Added new lines in all three, and fixed a typo in diffie-hellman.
Copy link
Contributor

@ijanos ijanos left a comment

Choose a reason for hiding this comment

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

👍

Copy link
Member

@petertseng petertseng left a comment

Choose a reason for hiding this comment

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

fantastic, thank you (I will squash)

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