Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
lalitb committed Feb 21, 2024
1 parent 1c440e0 commit 75c853e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion opentelemetry-sdk/src/metrics/internal/sum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ struct ValueMap<T: Number<T>> {
buckets: Arc<HashMap<u8, Mutex<HashMap<AttributeSet, T>>>>,
has_no_value_attribute_value: AtomicBool,
no_attribute_value: T::AtomicTracker,
total_count: AtomicUsize, // Add this line
total_count: AtomicUsize,
}

impl<T: Number<T>> Default for ValueMap<T> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ impl TemporalitySelector for InMemoryMetricsExporter {
#[async_trait]
impl PushMetricsExporter for InMemoryMetricsExporter {
async fn export(&self, metrics: &mut ResourceMetrics) -> Result<()> {
if metrics.scope_metrics.len() == 0 || metrics.scope_metrics[0].metrics.len() == 0 {
if metrics.scope_metrics.is_empty() || metrics.scope_metrics[0].metrics.is_empty() {
return Ok(());
}
self.metrics
Expand Down

0 comments on commit 75c853e

Please sign in to comment.