File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
datadog-profiling/src/profiles Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -57,19 +57,16 @@ impl Write for SizeRestrictedBuffer {
57
57
}
58
58
}
59
59
60
- type Encoder = zstd:: Encoder < ' static , SizeRestrictedBuffer > ;
61
-
62
60
/// Used to compress profile data.
63
61
pub struct Compressor {
64
- encoder : Encoder ,
62
+ encoder : zstd :: Encoder < ' static , SizeRestrictedBuffer > ,
65
63
}
66
64
67
65
impl Compressor {
68
66
/// Creates a new compressor with the provided configuration.
69
67
///
70
- /// - `size_hint`: beginning capacity for the output buffer. This is a
71
- /// hint for the starting size, and the implementation may use something
72
- /// different.
68
+ /// - `size_hint`: beginning capacity for the output buffer. This is a hint for the starting
69
+ /// size, and the implementation may use something different.
73
70
/// - `max_capacity`: the maximum size for the output buffer (hard limit).
74
71
/// - `compression_level`: see [`zstd::Encoder::new`] for the valid range.
75
72
pub fn try_new (
@@ -78,7 +75,8 @@ impl Compressor {
78
75
compression_level : i32 ,
79
76
) -> io:: Result < Compressor > {
80
77
let buffer = SizeRestrictedBuffer :: try_new ( size_hint, max_capacity) ?;
81
- let encoder = Encoder :: new ( buffer, compression_level) ?;
78
+ let encoder =
79
+ zstd:: Encoder :: < ' static , SizeRestrictedBuffer > :: new ( buffer, compression_level) ?;
82
80
Ok ( Compressor { encoder } )
83
81
}
84
82
You can’t perform that action at this time.
0 commit comments