Skip to content

Commit

Permalink
chore: make it work with Rust versions prior to 1.79.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ctron committed Aug 28, 2024
1 parent d5ae6ae commit 418b164
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3368,7 +3368,8 @@ pub(crate) fn format_number(number: usize) -> String {
/// Format large value in locale appropriate style.
pub(crate) fn format_value<T>(value: &Value<T>) -> String
where
T: DeltaValue<Delta: ToFormattedString> + ToFormattedString,
T: DeltaValue + ToFormattedString,
<T as DeltaValue>::Delta: ToFormattedString,
{
value.formatted_number(&Locale::en)
}
Expand Down
3 changes: 2 additions & 1 deletion src/metrics/delta.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ impl<T: DeltaValue> Value<T> {

impl<T> Value<T>
where
T: DeltaValue<Delta: ToFormattedString> + ToFormattedString,
T: DeltaValue + ToFormattedString,
<T as DeltaValue>::Delta: ToFormattedString,
{
pub fn formatted_number(&self, format: &impl Format) -> String {
match self {
Expand Down

0 comments on commit 418b164

Please sign in to comment.