Skip to content

Remove variables that start with an underscore#477

Merged
petertseng merged 2 commits intoexercism:masterfrom
Baelyk:476
Mar 19, 2018
Merged

Remove variables that start with an underscore#477
petertseng merged 2 commits intoexercism:masterfrom
Baelyk:476

Conversation

@Baelyk
Copy link
Copy Markdown
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
Copy Markdown
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.

Comment thread exercises/diffie-hellman/src/lib.rs Outdated
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
Copy Markdown
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)

Comment thread exercises/diffie-hellman/src/lib.rs Outdated
}
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)
} No newline at end of file
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.

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