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 metrics/src/handles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ impl Counter {
///
/// Suitable when a handle must be provided that does nothing i.e. a no-op recorder or a layer
/// that disables specific metrics, and so on.
pub fn noop() -> Self {
pub const fn noop() -> Self {
Self { inner: None }
}

Expand Down Expand Up @@ -118,7 +118,7 @@ impl Gauge {
///
/// Suitable when a handle must be provided that does nothing i.e. a no-op recorder or a layer
/// that disables specific metrics, and so on.
pub fn noop() -> Self {
pub const fn noop() -> Self {
Self { inner: None }
}

Expand Down Expand Up @@ -154,7 +154,7 @@ impl Histogram {
///
/// Suitable when a handle must be provided that does nothing i.e. a no-op recorder or a layer
/// that disables specific metrics, and so on.
pub fn noop() -> Self {
pub const fn noop() -> Self {
Self { inner: None }
}

Expand Down