Closed XOR-op closed 2 years ago
Please run scripts/format.sh
to pass the cargo format check.
LGTM. Thanks for your first (in fact second) PR!
It seems using signal-hook crate (https://docs.rs/signal-hook/latest/signal_hook/flag/index.html) would make the code more clean.
We should avoid using too many lazy_static
in the code
It seems using signal-hook crate (https://docs.rs/signal-hook/latest/signal_hook/flag/index.html) would make the code more clean.
We should avoid using too many
lazy_static
in the code
Agreed about the lazy_static. I also noticed that there's a dozen crates doing this ctrl-c handling. In the end I just decide to reduce dependencies. Let's switch to 'signal-hook' when we need to handle more signals in the future.
Why are these changes needed?
Related issue number
Checks
scripts/clippy.sh
to lint the changes in this PR.Welcome for advice if I used something wrong with Rust.