From 2a4b9a7be1ff7a6792f5e53e4b4b4fa07c83347e Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Tue, 28 Feb 2023 09:17:28 +0100 Subject: [PATCH] Fix linter --- lib/cli/src/commands/run.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/cli/src/commands/run.rs b/lib/cli/src/commands/run.rs index e3c1c416969..1889fc64f73 100644 --- a/lib/cli/src/commands/run.rs +++ b/lib/cli/src/commands/run.rs @@ -174,8 +174,8 @@ impl RunWithPathBuf { if let Err(err) = invoke_res { if let Some(coredump_path) = self.coredump_on_trap.as_ref() { - let source_name = self.path.to_str().unwrap_or_else(|| "unknown"); - if let Err(coredump_err) = generate_coredump(&err, &source_name, &coredump_path) { + let source_name = self.path.to_str().unwrap_or("unknown"); + if let Err(coredump_err) = generate_coredump(&err, source_name, coredump_path) { eprintln!("warning: coredump failed to generate: {}", coredump_err); Err(err) } else {