-
Notifications
You must be signed in to change notification settings - Fork 543
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
Conversation
Resolves exercism#476 Removed the underscore and included the variable in the `unimplemented!()` macro to get around unused variable warnings.
There was a problem hiding this 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.
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) |
There was a problem hiding this comment.
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
)
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) | ||
} |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this 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)
Resolves #476
Removed the underscore and included the variable in the
unimplemented!()
macro to get around unused variable warnings.