Skip to content

Commit 4ff39f6

Browse files
committed
remove import reordering
Signed-off-by: Benjamin Coenen <[email protected]>
1 parent e7823e6 commit 4ff39f6

File tree

3 files changed

+24
-32
lines changed

3 files changed

+24
-32
lines changed

opentelemetry-sdk/src/metrics/internal/aggregate.rs

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
use std::marker;
2-
use std::sync::atomic::AtomicU64;
3-
use std::sync::Arc;
1+
use std::{marker, sync::Arc, sync::atomic::AtomicU64};
42

53
use once_cell::sync::Lazy;
64
use opentelemetry::KeyValue;
75

8-
use super::exponential_histogram::ExpoHistogram;
9-
use super::histogram::Histogram;
10-
use super::last_value::LastValue;
11-
use super::sum::PrecomputedSum;
12-
use super::sum::Sum;
13-
use super::Number;
14-
use crate::metrics::data::Aggregation;
15-
use crate::metrics::data::Gauge;
16-
use crate::metrics::data::Temporality;
17-
use crate::metrics::AttributeSet;
6+
use crate::{
7+
metrics::data::{Aggregation, Gauge, Temporality},
8+
metrics::AttributeSet,
9+
};
10+
11+
use super::{
12+
exponential_histogram::ExpoHistogram,
13+
histogram::Histogram,
14+
last_value::LastValue,
15+
sum::{PrecomputedSum, Sum},
16+
Number,
17+
};
1818

1919
static STREAM_CARDINALITY_LIMIT: AtomicU64 = AtomicU64::new(2000);
2020
pub(crate) static STREAM_OVERFLOW_ATTRIBUTE_SET: Lazy<AttributeSet> = Lazy::new(|| {

opentelemetry-sdk/src/metrics/internal/mod.rs

+5-11
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,14 @@ mod last_value;
55
mod sum;
66

77
use core::fmt;
8-
use std::ops::Add;
9-
use std::ops::AddAssign;
10-
use std::ops::Sub;
11-
use std::sync::atomic::AtomicI64;
12-
use std::sync::atomic::AtomicU64;
13-
use std::sync::atomic::Ordering;
8+
use std::ops::{Add, AddAssign, Sub};
9+
use std::sync::atomic::{AtomicI64, AtomicU64, Ordering};
1410
use std::sync::Mutex;
1511

1612
pub use aggregate::set_stream_cardinality_limit;
17-
pub(crate) use aggregate::AggregateBuilder;
18-
pub(crate) use aggregate::ComputeAggregation;
19-
pub(crate) use aggregate::Measure;
20-
pub(crate) use exponential_histogram::EXPO_MAX_SCALE;
21-
pub(crate) use exponential_histogram::EXPO_MIN_SCALE;
13+
14+
pub(crate) use aggregate::{AggregateBuilder, ComputeAggregation, Measure};
15+
pub(crate) use exponential_histogram::{EXPO_MAX_SCALE, EXPO_MIN_SCALE};
2216

2317
/// Marks a type that can have a value added and retrieved atomically. Required since
2418
/// different types have different backing atomic mechanisms

opentelemetry-sdk/src/metrics/mod.rs

+6-8
Original file line numberDiff line numberDiff line change
@@ -52,24 +52,22 @@ pub(crate) mod pipeline;
5252
pub mod reader;
5353
pub(crate) mod view;
5454

55-
use std::collections::hash_map::DefaultHasher;
56-
use std::collections::HashSet;
57-
use std::hash::Hash;
58-
use std::hash::Hasher;
59-
6055
pub use aggregation::*;
6156
pub use instrument::*;
6257
pub use internal::set_stream_cardinality_limit;
6358
pub use manual_reader::*;
6459
pub use meter::*;
6560
pub use meter_provider::*;
66-
use opentelemetry::Key;
67-
use opentelemetry::KeyValue;
68-
use opentelemetry::Value;
6961
pub use periodic_reader::*;
7062
pub use pipeline::Pipeline;
7163
pub use view::*;
7264

65+
use std::collections::hash_map::DefaultHasher;
66+
use std::collections::HashSet;
67+
use std::hash::{Hash, Hasher};
68+
69+
use opentelemetry::{Key, KeyValue, Value};
70+
7371
/// A unique set of attributes that can be used as instrument identifiers.
7472
///
7573
/// This must implement [Hash], [PartialEq], and [Eq] so it may be used as

0 commit comments

Comments
 (0)