Use must_use on the ObserveWhen

Otherwise, nothing would get observed, so better warn on it.
This commit is contained in:
Michal 'vorner' Vaner 2019-07-11 18:39:51 +02:00
parent 3147ca034f
commit ea96d5c6a0
No known key found for this signature in database
GPG Key ID: F700D0C019E4C66F
1 changed files with 1 additions and 0 deletions

View File

@ -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>,