rust-prometheus icon indicating copy to clipboard operation
rust-prometheus copied to clipboard

Enhance: replace `unwrap()` with `Result` to handle errors in `register-*` macros

Open eval-exec opened this issue 2 years ago • 1 comments

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.

eval-exec avatar Mar 07 '23 00:03 eval-exec

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.

eval-exec avatar Mar 07 '23 08:03 eval-exec