Skip to content
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

Changes to code style #34

Merged
merged 1 commit into from
Feb 11, 2020
Merged

Changes to code style #34

merged 1 commit into from
Feb 11, 2020

Conversation

cserb
Copy link
Contributor

@cserb cserb commented Feb 1, 2020

@cserb
Copy link
Contributor Author

cserb commented Feb 1, 2020

Forgot to bump up the version number, as it’s not backwards compatible due to renaming EC_Point and ECDSA_Signature

Copy link
Owner

@q9f q9f left a comment

Choose a reason for hiding this comment

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

LGTM if you could remove the two obsolete docs

docs/Secp256k1/ECDSA_Signature.html Show resolved Hide resolved
docs/Secp256k1/EC_Point.html Show resolved Hide resolved
@@ -40,7 +40,7 @@
<div class="types-list">
<ul>

<li class="parent open" data-id="github.com/q9f/secp256k1.cr/Secp256k1" data-name="secp256k1">
Copy link
Owner

Choose a reason for hiding this comment

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

can you restore the open class here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't know how to do that, since this is generated by crystal doc

@@ -451,7 +446,7 @@ module Secp256k1::Bitcoin
pk_checksum = hashed_twice[0, 8]
valid = valid && wif_checksum === pk_checksum
end
return valid
valid
Copy link
Owner

Choose a reason for hiding this comment

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

i personally prefer having return statements to improve readability but I'm not very opinionated about it, so LGTM

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I actually concur, but the crystal/ruby community decided to use return only for early break outs

* followed ameba linting https://crystal-ameba.github.io/
* followed crystal coding style convention https://crystal-lang.org/reference/conventions/coding_style.html
* removed unreachable code
* version bump
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.

2 participants