Skip to content

Commit 2fd1d29

Browse files
committed
style: fix clippy lints
1 parent 958b210 commit 2fd1d29

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

datadog-profiling/src/internal/observation/timestamped_observations.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ impl TimestampedObservations {
2828
const DEFAULT_BUFFER_SIZE: usize = 1_048_576;
2929

3030
pub fn new(sample_types_len: usize) -> Self {
31+
#[allow(clippy::expect_used)] // previous API panic'd implicitly
3132
Self {
3233
compressed_timestamped_data: zstd::Encoder::new(
3334
Vec::with_capacity(Self::DEFAULT_BUFFER_SIZE),
@@ -39,6 +40,7 @@ impl TimestampedObservations {
3940
}
4041

4142
pub fn with_no_backing_store() -> Self {
43+
#[allow(clippy::expect_used)] // previous API panic'd implicitly
4244
Self {
4345
compressed_timestamped_data: zstd::Encoder::new(vec![], 1)
4446
.expect("failed to create zstd encoder"),
@@ -72,7 +74,7 @@ impl TimestampedObservations {
7274
}
7375

7476
pub fn into_iter(self) -> TimestampedObservationsIter {
75-
#[allow(clippy::unwrap_used)]
77+
#[allow(clippy::expect_used, clippy::unwrap_used)]
7678
TimestampedObservationsIter {
7779
decoder: zstd::Decoder::new(Cursor::new(
7880
self.compressed_timestamped_data.finish().unwrap(),

datadog-profiling/src/profiles/compressor.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ impl Compressor {
6868
/// Creates a new compressor with the provided configuration.
6969
///
7070
/// - `size_hint`: beginning capacity for the output buffer. This is a
71-
/// hint for the starting size, and a different one may
72-
/// be used.
71+
/// hint for the starting size, and the implementation may use something
72+
/// different.
7373
/// - `max_capacity`: the maximum size for the output buffer (hard limit).
7474
/// - `compression_level`: see [`zstd::Encoder::new`] for the valid range.
7575
pub fn try_new(

0 commit comments

Comments
 (0)