Skip to content

Commit

Permalink
Resolve more clippies
Browse files Browse the repository at this point in the history
  • Loading branch information
hatchan committed May 3, 2024
1 parent d8f7218 commit e9023a4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions providers/prometheus/src/timeseries.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use fiberplane_pdk::prelude::*;
use grafana_common::{query_direct_and_proxied, Config};
use serde::Deserialize;
use serde_json::Result as SerdeResult;
use std::fmt::Display;
use std::time::SystemTime;
use time::ext::NumericalDuration;

Expand All @@ -26,9 +27,9 @@ struct StepSize {
unit: StepUnit,
}

impl ToString for StepSize {
fn to_string(&self) -> String {
format!("{}{}", self.amount, self.unit.to_str())
impl Display for StepSize {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{}{}", self.amount, self.unit.to_str())
}
}

Expand Down

0 comments on commit e9023a4

Please sign in to comment.