rust-prometheus
rust-prometheus copied to clipboard
Enhance: replace `unwrap()` with `Result` to handle errors in `register-*` macros
This PR modifies the register_* macro to use the and_then method instead of unwrap to handle errors.
The purpose of this change is to improve error handling and make the code more robust.
https://github.com/tikv/rust-prometheus/actions/runs/4349482473/jobs/7603874911
The CI action failed, I think we should upgrade the rust toolchain's version.