Draft
Conversation
breezewish
reviewed
Feb 18, 2021
| pub use self::errors::{Error, Result}; | ||
| pub use self::gauge::{Gauge, GaugeVec, IntGauge, IntGaugeVec}; | ||
| #[deprecated(since = "0.12.0", note = "Please use DEFAULT_FLOAT_BUCKETS")] | ||
| pub use self::histogram::DEFAULT_BUCKETS; |
Member
There was a problem hiding this comment.
Considering that Histogram is called Histogram instead of FloatHistogram, I suggest to keep DEFAULT_BUCKETS and not being DEFAULT_FLOAT_BUCKETS. What do you think?
| } | ||
|
|
||
| fn check_and_adjust_buckets(mut buckets: Vec<f64>) -> Result<Vec<f64>> { | ||
| fn check_and_adjust_int_buckets(mut buckets: Vec<u64>) -> Result<Vec<u64>> { |
Member
There was a problem hiding this comment.
Maybe we can use generics to avoid writing code twice.
Author
There was a problem hiding this comment.
From what i can tell this would require a bit of a re-architecture. I will take a closer look this may be a breaking change and see what i can do.
|
|
||
| } | ||
|
|
||
| impl IntHistogramCore { |
Member
There was a problem hiding this comment.
We'd better avoid duplicating these codes. You can try with generics!
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.
No description provided.