From 0fff404fb20adfcda5b940701f604a662f57a21f Mon Sep 17 00:00:00 2001 From: Waleed Khan Date: Sun, 4 Jun 2023 23:57:12 -0500 Subject: [PATCH] cleanup: fix clippy issues --- src/cli_util.rs | 2 +- tests/test_log_command.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cli_util.rs b/src/cli_util.rs index 9ddb388d7..23e1d3d66 100644 --- a/src/cli_util.rs +++ b/src/cli_util.rs @@ -2184,7 +2184,7 @@ fn resolve_default_command( } let default_command = config .get_string("ui.default-command") - .unwrap_or("log".to_string()); + .unwrap_or_else(|_| "log".to_string()); // Insert the default command directly after the path to the binary. string_args.insert(1, default_command); } diff --git a/tests/test_log_command.rs b/tests/test_log_command.rs index 0c211e703..2d09a14c1 100644 --- a/tests/test_log_command.rs +++ b/tests/test_log_command.rs @@ -392,7 +392,7 @@ fn test_log_prefix_highlight_styled() { branches, ) "###, - len.map(|l| l.to_string()).unwrap_or(String::default()) + len.map(|l| l.to_string()).unwrap_or_default() ) }