gcarq / rusty-blockparser

Bitcoin Blockchain Parser written in Rust language
GNU General Public License v3.0
370 stars 145 forks source link

bump clap dependency to 4.x #96

Closed dspicher closed 1 year ago

dspicher commented 1 year ago

This gets rid of two security advisories [1, 2] reported by cargo audit [3]. After this commit, no other vulnerabilities are reported by the tool.

This is a heavily breaking change, as the Callback trait had to be adapted.

We prefer to keep the diff as minimal as possible, rather than strive for the maximally idiomatic code. Thus, we refrain for now from optimizations such as deriving clap::ValueEnum on blockchain::parser::types::CoinType, or using clap::command!() to read the crate author and version from the Cargo manifest.

We reshuffle the argument parsing code a bit in order to be able to add a set of unit tests that assert some basic desired behaviors.

The updated help text is reflected in the diff of the README file.

[1] https://rustsec.org/advisories/RUSTSEC-2021-0139

[2] https://rustsec.org/advisories/RUSTSEC-2021-0145

[3] https://crates.io/crates/cargo-audit

Closes #95.

gcarq commented 1 year ago

Thanks, looks very promising. I will have a closer look next week.

gcarq commented 1 year ago

LGTM, thanks a lot!