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
Improved docs, fixed clippy warnings, fixed cargo fmt #42
Conversation
Interesting. I'll circle back after #41 is merged. We'll probably need a rebase then as well. |
The changes look good, some transformations from index to iterator loops might even make the code faster. The only problem I don't have a good solution for right now is how to handle the If we accept |
Needs rebase. |
Is there a reason to support Rust 1.22? Maybe it could be |
The rationale for older rust versions is given in rust-bitcoin/rust-bitcoin#338, although I can't remember why it's exactly 1.22. 1.24 seems to be the version we really want to support, but I fear that won't help with our problem. |
I don't see any easy way of supporting rustfmt's skip. |
Regarding cargo audit: having it run on every PR prevents pulling in already vulnerable dependencies -- who knows? :-) |
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.
The changes already made look good to me. But to preserve the formatting over future PRs we really need to integrate rustfmt into our build pipeline (only for stable I guess). Do you know your way around travis? If not I could do it so we can merge the PR.
I would be glad if you could do it :-) |
4f77f79
to
0a7bcb1
Compare
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.
@duesee I'd be glad if you could take a look at the CI tests I added. I think they should check all the changes you did in this PR.
From my side it looks merge ready now. @clarkmoody what do you think?
- rustup component add rustfmt | ||
- rustup component add clippy | ||
script: | ||
- rustfmt --check src/lib.rs |
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.
Is there a better way to do this? Apparently cargo fmt
doesn't support the --check
flag, so I have to use rustfmt
directly and specify the files to check.
Oh, I just noticed that there are merge conflicts now. I'll try to rebase. |
* why is Bech32 used? * mention "1" as separator * refer explicitly to original description *for more details*
Thank you @sgeisler! The CI should catch everything now. Having cargo audit run on every push might still be a good (and easy to implement) idea. But it could be added at a later time and issue. |
Oh yeah, I totally forgot about that. Will amend the last commit tomorrow.
|
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 works for me.
@sgeisler We can update the Travis script with something more clever later, if need be.
I though about |
You don't have dependencies now ;-) |
I think it should be a long-term goal that this library has no dependencies... |
When reading the code I made some minor improvements I wanted to share. Notably, I tried to make the usecase for Bech32 more clear and fix all clippy warnings and "incorrect" formatting.
Have you thought about introducing a CI (e.g., via GitHub actions) which checks against cargo audit, cargo clippy and cargo fmt?