Skip to content
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

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

eval-exec
Copy link
Contributor

@eval-exec eval-exec commented Mar 7, 2023

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 eval-exec changed the title enhance: Replace unwrap() with Result to handle errors Enhance: replace unwrap() with Result to handle errors in register-* macros Mar 7, 2023
@eval-exec eval-exec force-pushed the enhance/better-error-handle branch from 7ea049f to 332edc3 Compare March 7, 2023 00:55
@eval-exec
Copy link
Contributor Author

eval-exec commented Mar 7, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant