feat(encoding): impl EncodeLabelValue for bool#237
Merged
mxinden merged 2 commits intoprometheus:masterfrom Nov 29, 2024
koushiro-contrib:impl-encode-label-value-for-bool
Merged
feat(encoding): impl EncodeLabelValue for bool#237mxinden merged 2 commits intoprometheus:masterfrom koushiro-contrib:impl-encode-label-value-for-bool
EncodeLabelValue for bool#237mxinden merged 2 commits intoprometheus:masterfrom
koushiro-contrib:impl-encode-label-value-for-bool
Conversation
cratelyn
reviewed
Nov 18, 2024
Comment on lines
+540
to
+544
| impl EncodeLabelValue for bool { | ||
| fn encode(&self, encoder: &mut LabelValueEncoder) -> Result<(), std::fmt::Error> { | ||
| encoder.write_str(if *self { "true" } else { "false" }) | ||
| } | ||
| } |
Contributor
There was a problem hiding this comment.
for the record, i would support this addition, i think it's a pleasant and natural addition to the library.
that said, the reordering of impl blocks here is probably best left for a distinct pull request, as it introduces a lot of undue noise for reviewers to inspect.
mxinden
reviewed
Nov 28, 2024
Member
mxinden
left a comment
There was a problem hiding this comment.
Thank you.
Can you please add a changelog entry to the commit adding the impl for bool.
Please keep the split into two commits.
Contributor
Author
|
There are some clippy warnings introduced by rust 1.83 during CI check. |
mxinden
approved these changes
Nov 29, 2024
Member
mxinden
left a comment
There was a problem hiding this comment.
Thanks!
One nit pick. Otherwise ready to merge.
Mind updating to latest master, or giving me access to merge master into this pull request?
Signed-off-by: koushiro <[email protected]>
Signed-off-by: koushiro <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
EncodeLabelValueforbool