ok/jj
1
0
Fork 0
forked from mirrors/jj

cleanup: fix clippy issues

This commit is contained in:
Waleed Khan 2023-06-04 23:57:12 -05:00
parent 7f3d07e35f
commit 0fff404fb2
2 changed files with 2 additions and 2 deletions

View file

@ -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);
}

View file

@ -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()
)
}