Skip to content

Commit 02e1279

Browse files
Fix clippy lints
1 parent 0cf9a33 commit 02e1279

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

foundations/src/telemetry/memory_profiler.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -195,12 +195,8 @@ fn collect_heap_profile() -> Result<String> {
195195
let mut out_file_path_c_str = CString::new(out_file_path)?.into_bytes_with_nul();
196196
let out_file_path_ptr = out_file_path_c_str.as_mut_ptr() as *mut c_char;
197197

198-
control::write(control::PROF_DUMP, out_file_path_ptr).map_err(|e| {
199-
format!(
200-
"failed to dump jemalloc heap profile to {:?}: {}",
201-
out_file_path, e
202-
)
203-
})?;
198+
control::write(control::PROF_DUMP, out_file_path_ptr)
199+
.map_err(|e| format!("failed to dump jemalloc heap profile to {out_file_path:?}: {e}",))?;
204200

205201
let mut profile = Vec::new();
206202

foundations/src/telemetry/tracing/live/event_output.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,7 @@ impl TraceLogBuilder {
9393

9494
fn finalize(mut self, end_timestamp: u64) -> String {
9595
self.out.push_str(&format!(
96-
"{{\"pid\":1,\"name\":\"Trace dump requested\",\"ph\":\"i\",\"ts\":{},\"s\":\"g\"}}",
97-
end_timestamp,
96+
"{{\"pid\":1,\"name\":\"Trace dump requested\",\"ph\":\"i\",\"ts\":{end_timestamp},\"s\":\"g\"}}",
9897
));
9998

10099
self.out.push(']');

0 commit comments

Comments
 (0)