mirror of https://github.com/fralalonde/dipstick
Use must_use on the ObserveWhen
Otherwise, nothing would get observed, so better warn on it.
This commit is contained in:
parent
3147ca034f
commit
ea96d5c6a0
|
@ -197,6 +197,7 @@ pub trait Observe {
|
|||
/// common.
|
||||
type Inner;
|
||||
/// Provide a source for a metric's values.
|
||||
#[must_use = "must specify when to observe"]
|
||||
fn observe<F>(
|
||||
&self,
|
||||
metric: impl Deref<Target = InputMetric>,
|
||||
|
|
Loading…
Reference in New Issue