Remove variables that start with an underscore#477
Merged
petertseng merged 2 commits intoexercism:masterfrom Mar 19, 2018
Merged
Remove variables that start with an underscore#477petertseng merged 2 commits intoexercism:masterfrom
petertseng merged 2 commits intoexercism:masterfrom
Conversation
Resolves exercism#476 Removed the underscore and included the variable in the `unimplemented!()` macro to get around unused variable warnings.
petertseng
suggested changes
Mar 18, 2018
Member
petertseng
left a comment
There was a problem hiding this comment.
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) |
Member
There was a problem hiding this comment.
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) | ||
| } No newline at end of file |
Member
There was a problem hiding this comment.
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.
petertseng
approved these changes
Mar 19, 2018
Member
petertseng
left a comment
There was a problem hiding this comment.
fantastic, thank you (I will squash)
This was referenced Mar 20, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #476
Removed the underscore and included the variable in the
unimplemented!()macro to get around unused variable warnings.