Skip to content

Commit

Permalink
Clean up nits.
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeBlanch committed Nov 21, 2023
1 parent 152220c commit 1c264e8
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/OpenTelemetry/Metrics/MetricReaderExt.cs
Original file line number Diff line number Diff line change
Expand Up @@ -256,15 +256,8 @@ private static void DeactivateMetric(Metric metric)
}

private bool TryGetExistingMetric(in MetricStreamIdentity metricStreamIdentity, [NotNullWhen(true)] out Metric? existingMetric)
{
if (!this.instrumentIdentityToMetric.TryGetValue(metricStreamIdentity, out existingMetric)
|| !existingMetric.Active)
{
return false;
}

return true;
}
=> this.instrumentIdentityToMetric.TryGetValue(metricStreamIdentity, out existingMetric)
&& existingMetric.Active;

private void CreateOrUpdateMetricStreamRegistration(in MetricStreamIdentity metricStreamIdentity)
{
Expand Down

0 comments on commit 1c264e8

Please sign in to comment.