chore: fix lint warnings

pull/24376/head
Dom Dwyer 2022-04-06 16:45:31 +01:00
parent 091640bb23
commit 24eeddce8a
1 changed files with 5 additions and 5 deletions

View File

@ -292,23 +292,23 @@ mod tests {
}
/// Extract the metric with the given name from `metrics`.
fn get_metric<'a, T: MetricObserver>(
metrics: &'a metric::Registry,
fn get_metric<T: MetricObserver>(
metrics: &metric::Registry,
name: &'static str,
attrs: &Attributes,
) -> Observation {
metrics
.get_instrument::<Metric<T>>(name)
.expect(format!("did not find metric {}", name).as_str())
.unwrap_or_else(|| panic!("did not find metric {}", name))
.get_observer(attrs)
.expect(format!("failed to match {} attributes", name).as_str())
.unwrap_or_else(|| panic!("failed to match {} attributes", name))
.observe()
}
/// Initialise a [`SinkInstrumentation`] and drive it with the given
/// parameters.
async fn test(
op: impl Into<DmlOperation>,
op: impl Into<DmlOperation> + Send,
metrics: &metric::Registry,
with_sink_return: Result<bool, crate::data::Error>,
with_fetcher_return: Option<u64>,