Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/pulling_gauge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use crate::{

/// A [Gauge] that returns the value from a provided function on every collect run.
///
/// This metric is the equivalant of Go's
/// This metric is the equivalent of Go's
/// <https://pkg.go.dev/github.com/prometheus/[email protected]/prometheus#GaugeFunc>
///
/// # Examples
Expand All @@ -28,7 +28,7 @@ use crate::{
#[derive(Clone)]
pub struct PullingGauge {
desc: crate::core::Desc,
value: Arc<Box<dyn Fn() -> f64 + Send + Sync>>,
value: Arc<dyn Fn() -> f64 + Send + Sync>,
}

impl fmt::Debug for PullingGauge {
Expand All @@ -48,7 +48,7 @@ impl PullingGauge {
value: Box<dyn Fn() -> f64 + Send + Sync>,
) -> crate::Result<Self> {
Ok(PullingGauge {
value: Arc::new(value),
value: Arc::from(value),
desc: crate::core::Desc::new(name.into(), help.into(), Vec::new(), HashMap::new())?,
})
}
Expand Down
Loading